
Instruction Set Listing
3-6
Stack Movement Instructions
General I/O Movement Instructions
String I/O Movement Instructions
Flag Movement Instructions
3.1.7
Decimal Arithmetic
In addition to binary arithmetic, the microcontroller supports arithmetic using numbers
represented in the binary-coded decimal (BCD) system. The BCD system uses four bits to
represent a single decimal digit. When two decimal digits are stored in a byte, the number
is called a
packed decimal number. When only one decimal digit is stored in a byte, the
number is called an
unpacked decimal number.
To perform decimal arithmetic, the microcontroller uses a subset of the binary arithmetic
instructions and a special set of instructions that convert unsigned binary numbers to
decimal.
Arithmetic Instructions That Are Used with Decimal Numbers
Mnemonic
Name
See Page
POP
Pop Component from Stack
POPA
Pop All 16-Bit General Registers from Stack
POPF
Pop Flags from Stack
PUSH
Push Component onto Stack
PUSHA
Push All 16-Bit General Registers onto Stack
PUSHF
Push Flags onto Stack
Mnemonic
Name
See Page
IN
Input Component from Port
OUT
Output Component to Port
Mnemonic
Name
See Page
INS
Input String Component from Port
INSB
Input String Byte from Port (
Synonym for
INS)
INSW
Input String Word from Port (
Synonym for
INS)
OUTS
Output String Component to Port
OUTSB
Output String Byte to Port (
Synonym for
OUTS)
OUTSW
Output String Word to Port (
Synonym for
OUTS)
Mnemonic
Name
See Page
LAHF
Load AH with Flags
SAHF
Store AH in Flags
Mnemonic
Name
See Page
ADD
Add Numbers
DIV
Divide Unsigned Numbers
MUL
Multiply Unsigned Numbers
SUB
Subtract Numbers
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...