
Instruction Set Listing
3-6
S tac k Movement Instruc tions
General I/O Movement Instruc tions
S tring I/O Movement Instruc tions
Flag Movement Instruc tions
3.1.7
Dec imal 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 packeddecimal number. When only one decimal digit is stored in a byte, the
number is called an unpackeddecimal 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 Instruc tions T hat Are Used w ith Dec imal Numbers
Mnemonic
Name
See Page
POP
POPA
POPF
PUSH
PUSHA
PUSHF
Pop Component from Stack
Pop All 16-Bit General Registers from Stack
Pop Flags from Stack
Push Component onto Stack
Push All 16-Bit General Registers onto Stack
Push Flags onto Stack
4-175
4-178
4-180
4-181
4-184
4-186
Mnemonic
Name
See Page
IN
OUT
Input Component from Port
Output Component to Port
4-67
4-171
Mnemonic
Name
See Page
INS
INSB
INSW
OUTS
OUTSB
OUTSW
Input String Component from Port
Input String Byte from Port (Synonym forINS)
Input String Word from Port (Synonym forINS)
Output String Component to Port
Output String Byte to Port (Synonym forOUTS)
Output String Word to Port (Synonym forOUTS)
4-71
4-71
4-71
4-173
4-173
4-173
Mnemonic
Name
See Page
LAHF
SAHF
Load AH with Flags
Store AH in Flags
4-129
4-209
Mnemonic
Name
See Page
ADD
DIV
MUL
SUB
Add Numbers
Divide Unsigned Numbers
Multiply Unsigned Numbers
Subtract Numbers
4-14
4-50
4-160
4-240