Sie sind auf Seite 1von 11

effective

address
word
to
doubleword
Decimal
Add
ASCII
Translate
Load
Negate
Exchange
Decimal
Compare
Integer
ASCII
"AND"
Inclusive
Rotate
byte
pointer
AH
adjust
right
byte
divide
adjust
adjust
or
register
"OR"
byte
operands
byte
word
or
byte
for
using
for
byte
or
word
for
for
byte
addition
division
or
from
word
with
addition
subtraction
OS
or
word
or
word,
carry
flags
word
Wait
Interrupt
for
to
pin
near
active
or
far
address
Increment
Subtract
Complementation
Move
Decrement
Multiply
Convert
Exclusive
Shift
Sto
Clear
Set
re
carry
arithmetic
logical
carry
byte
AH
adjust
left
byte
byte
byte
flag
word
register
"OR"
byte
through
or
byte
flag
byte
through
right
to
word
or
or
(CF)
or
or
byte
word
(CF)
right
word,
or
word
subtraction
multiply
byte
in
word
or
byte
word
word
ES
carry,
flags
or
carry,
negation
byte
with
or
unsigned
signed
word
by
by
word
byte
or
1byte
borrow
1signed
unsigned
word
of
oror
byte
word
word
or word
Set
Software
Cal!
Return
Push
Pop
Move
Repeat
Input
Inte
Halt
Escape
Lock
No
Load
Loop
operation
rru
direction
procedure
flags
word
until
bus
flag
direction
byte
word
pt
from
while
toTEST
ifshort,
sifreturn
interrupt
during
off
external
onto
off
or
equal/zero
or
not
onto
overfl
string
procedure
word
flag
of
not
word
of
equal/not
flag
stack
stack
stack
next
ow
equal/zero
(DF)
processor
or
from
(DF)
instruction
zero
l/O
space
Scan
Output
Clear
Jump
Compare
Sto
re
interrupt
byte
interrupt
byte
conditional
byte
byte
string
or
or
enable
word
or
word
enable
word
(cc)
string
string
flag
toreset
flag
to
string
l/O
(El)
short
(El)
space
address
Jump Instructions
RET
PUSH
POP
PUSHF
MOVSB
CMPS
STOS
OUT
HLT
WAIT
LOCK
NOP
INTn
IRET
JCC
POPF
MOVWS
SCAS
STO
STI
INTO
LOOS
CLD
LOOPE/LOOPZ
REPE/REPZ
REPNE/REPNZ LOOP
Repeat
while
not
equal/not
zero
ESC
REP
IN
CL!
CALL
MOVS

Complement
Clear
Set
interrupt
interruptcarry
enable
enable
flag
flag
flag
(CF)
(IF)
(IF)
Data Transfer
Instructions
SHR
MUL
d
ion
Arithmetic
Rotate
AOD
SUB
Arithmetic
Instructions
Instructions
Instructions
ANO
LAHF
nd
Div.
Arithmetic
ntrollnstructions
structions
Shift Instructions
arithmetic/logicalleft byte or word
SAL/SHL

Figure A4.1

170

8088/8086

instruction

set groupings.

Input/Output
String
Interrupt
Instructions
Instructions
Instructions
Subroutine-Handling/Stack
Loop
External
Instructions
Synchronization/No
instructions
operation
Pretixes
and
Auto-Indexing
JMP
Instr.
tor String

Operations

Addition
INC
O
AAA
OAA
Format
AOO
O,
O,
S
S
PF AF.
SF.
CF AF, PF, CF,
SF,
Decimal
adjust
for
OF.
SF.
ZF, AF, PF,
CF ZF,
Operation
Add
carry
Flags
Affected
->AOC
(O)
(O)
Inerement
1with
by
1 ->
(S)
+ (O)
+
(CF)
ASCII
adjust
for
->
(O)
(O)
Meaning

OF.
OF, SF,
undefined
ZF, PF undefined

(a)

Aeeumulator
Register
Memory
Register

Destination

Source
Immediate
Memory
Register
Destination
Reg16
Reg8
Memory

(e)

(b)

Figure A4.2
(a) Addition instructions. (b) Allowed operands for ADD and ADC instructions. (e) Allowed
operands for INC instruction.

Mnemonic

OEC
NEG
AAS
Format
O
Subtraet
DAS
with
borrow
O,S
Oeerement
Negate
byfor
OF,
OF.
1for
SF.
ZF.
ZF, AF.
AF, PF,
PF AF,
CF CF
Operation
Meaning
Decimal
adjust
SUB
adjust
Flags
Affected
SF,
ZF, AF, PF, CF,
(CF)
(O)
(S)
->-SBB
->
(O)
->SF,
(O)
(O)
OASCII
- -(O)1

OF
OF, undefined
SF, ZF. PF undefined

(a)

Aeeumulator
Register
Memory
Register

Destination

Immediate
Source
Register
Memory

Destination
Destination
Reg16
Reg8
Memory
(b)

(e)

Register
Memory
(d)

Figure A4.3 (a) Subtraction instructions. (b) Allowed operands for SUB and SBB instructions. (e) Allowed
operands for NEG instruction.

171

AAD
AAM
Division
CWD
CBW
Formal
MULS
IMULS
SS-->
undefined
IDIV
Convert
word
None
Multiply
SF,
PF
CF
OF,
CF
Adjust
AX
AF,
CF
undefined
Meaning
Q((AL)/10)
AL
multiply
for
(AH)
O
F,AF,
SF,
PF
ZF,
PF,
divide
Convert
(AH)
byte
10
totoAX)
+
-->ZF,
(AL)
R((AU10)
-->CF
(AL)
(AL)
(S8)
(AX)
Flags
Affecled
..DIV
-.(AL)
(1)
Q((AX)/(S8))
-->
(AL)
(MSB
of
AL)
-->
(Al!
(Al!
bits
of
00
AH)
DX)
-->undefined
(AH)
(AX)
R((AX)/(S8))
.AF,
(S16)
-->
-->
(DX),(AX)
(AH)
Operalion Integer
Mnemonic
occurs
and
becomes
less
positive
and
exceeds
O FF16in
interrupl
occurs
Othan
interrupt
Iype
If
FFFF16in
Q R((DX,AX)/(S16))
is
case
case
(2),
then
(1)
or (DX)
7FFF16
800116,
orthen
if Qtype
is
negative
-->

(a)

Source
Reg8
Reg16
Mem8
Mem16

(b)
Figure A4.4

(a) Multiplication and division arithmetic instructions. (b) Allowed operands.

Mnemonic
AF undefined

NOTO
Format
"1 Affected
None
OR
XOR
O,S
logieallnelusive-OR
Exelusive-OR
ANO
O
O,S
F, SF,
ZF,
PF, CF
logieal
NOT
(S)
+
(O)
----.(O)
OF,
Meaning
(S)
(O)
----.(O)
Flags
(O)
----.(O)
(S)
EB
(O)ANO
----.(O)
SF,
ZF, PF,
CF
Operation

(a)

Aeeumulator
Register
Memory
Register

Destination

Source
Immediate
Register
Memory

Destination
Register
Memory

(e)

(b)

Figure A4.5 (a) Logic instructions. (b) Allowed operands for the AND, OR, and XOR instructions. (e) Allowed
operands for NOT instruction.

Mnemonic
signifieant bit

Shift
arithmetie
Format
OF
undefined
undefined
if eount
~ 1 bitsto positions
SHR
O,Count
SAR
O, Count
SAUSHl
Operation
O,Count
SF,
ZF,
the
PF,
CF
Shift
logieal
Shift
the
Meaning
(O) right
leftAF
CF,
Flags
byby
PF,
the
Affected
SF,
number
ZF
of
bitnumber
positions
equal
Count
and
fill
the
vaeated

(a)

Register
Memory
Register

Destination

Count
1
Cl

(b)

Figure A4.6

(a) Shift instructions. (b) Allowed operands.

!
CF
Rolate
Formal
left
1to
OF
ifFlags
count
undefined
ROL
O,Count
RCR
RClO,Count
ROR
O,Count
Operalion Rotate
Affecled
Meaning
(O)
rotation.
right
Rolale
left byby
Ihe
number
of
Same
as
ROR
except
carry
is
attached
to
carry
is
attached
Rotate
theROL
(O) except
right
thefor
number
ofof.bitbit
Mnemonic
if count of. 1

(a)
1
Counl
Cl
Deslinalion

Register
Memory
Register

(b)

Figure A4.7

Mnemonic

(a) Rotate instructions. (b) Allowed operands.

CF
IF
None
SF,
ZF,
AF,
PF,
load
Clear
Complement
Set
Store
Meaning
carry
interrupt
AH
carry
interrupt
AH
from
flag
into
flag
Operalion
flag
carry
flags
flags
flag
flag
Flags
Affecled
(AH)
(IF)
((CF)
(Flags)+-(AH)
(IF)+(CF)+CF)
+-1
++-1
+-CF
O
O
(CF)
(Flags)

(a)

AH
= Sign flag
= Zero flag
= Auxiliary
= Parity flag
= Carry flag
- = Undefined (do not use)

SF
ZF
AF
PF
CF

(b)

Figure A4.8

174

(a) Flag-control instructions. (b) Format o, the AH register lor the lAHF and SAHF instructions.

Format
CMP
AF,Affected
OF, PF, SF, ZF
Operation
Meaning
Flags
(O)Compare
- (S)D,S
is used inCF,
setting

(a)

Accumulator
Register
Memory
Register

Destination

Source
Immediate
Memory
Register

(b)

Figure A4.9

Mnemonic
operand

(a) Compare instruction. (b) Allowed operands.

Unconditional
Format
None toAffected
Operation
JMP
Operand
Meaning
Jump
is initiated
Flags
the
address
specified by the

(a)

Operands
Short-label
Near-Iabel
Far-Iabel
Memptr16
Regptr16
Memptr32

(b)

Figure A4.10

(a) Unconditional jump instruction. (b) Allowed operands.

Conditional
Format
None
Meaning
Jcc
Operation
If theOperand
specified
Flags
condition
Affected
is trueccthe jump to the
otherwise
instructionspecified
is executed.
next by the
address
operand
isthe
initiated;

(a)

Mnemonic

Zero
Overflow
Not
Greater
Below
Less
zero
below
overflow
ZF
CF
OF
SF
ZF=O
CF=
PF=
PF
ZF
==equal
O
1O
OF
1 ZF)
and
SF
=or1=1ZF)
O = 1
OF
Above
Condition
above
less
orOF)
ZF
Sign
Less
orodd
equal
Above
Greater
Not
Parity
Carry
CX
Below
register
carry
above
sign
greater
parity
equal
below
less
even
oror
nor
equal
equal
nor
is
equal
zero
equal
Meaning
Equal
nor
(((SF
(SF
xor
OF)
=ZF
=O
(CF
or
(SF
xor

(b)

Figure A4.11

176

(a) Conditional jump instruction. (b) Types 01 conditional jump instructions.

Subroutine
Execution
Format
cal!continues
Nonefrom
Meaning
CALL operand
Flags
Affected
Operation
such
on theto
asstack.
IPbyand
aretosaved
back
Information
the
main
required
program
return
specified
the CS
operando

(a)

Operand
Near-proc
Far-proc
Memptr16
Regptr16
Memptr32

(b)

Figure A4.12

(a) Subroutine call instruclion. (b) Allowed operands.

Formal
Return
None
RET
Meaning
or RET
Operation
Return
Operand
lo the
Flags
mainAffected
program
Mnemonic
it is added IftoOperand
the contents
of SP.
far-proc).
is present,

(a)

--

Operand

None
Disp16

(b)

Figure A4.13

(a) Return instruction. (b) Allowed operands.

Push
word
stack
PUSH
POP
Format
OFlags
None
S
Operation
Meaning
Pop
offonto
stack
Affected
(O)
((SP))
<- word
<((SP))
(S)
(SP) <- {SP)+2

(a)

Operand (8 or D)
Register
Seg-reg (CS illegal)
Memory

(b)

Figure

~4.14

Mnemonic
(SP) <- (SP)+2

Figure A4.15

(a) PUSH and POP instructions. (b) Allowed operands.

None
Meaning
Push
Pop fiags
OF,
Flags
flagsOF,
off
onto
Affected
((SP))
Operation
IF,
stack
TF,
stack
SF,
<(Flags)
AF, PF, CF
(Flags)
<- ZF,
((SP))

(a) Push flags and pop flags instrucitons.

LOOP
Format
Short-Iabel
LOOPE/LOOPZ
LOOPNE/LOOPNZ
Short-Iabel
Meaning
Operation
loop
Loop
while
while
not
not
equall
zero
equall<(CX)
<-Short-Iabel
(CX)<(CX)-1
(CX)
--1 1
Mnemonic
sequential
Jump
short-Iabel
initiated
to=-F location
defined
by
next
(CX) seq
-FisOuential
andif (CX)
(ZF)
instruction
o;
1;
o; otherwise,
otherwise,
execute
execute

Figure A4.16

178

loop instructions.

Jump to location defined by short-Iabel

if

MOVSB/MOVSW
Format
STOSB/STOSW
CMPSB/CMPSW
SCASB/SCASW
LOOSB/LOOSW
None
AF,
Meaning
Move
Opilration
Flags
Store
string
Load
Sean
Compare
string
Set
string
flags
as per
((OS)O
(AL
or (SI))
AX)
+CF,
(SI))
PF,
1Affected
or 2ZF, SF, OF
((ES)O
+ (01));(AL
or AX);((OS)O
+
Mnemonic
(DI)
;- (SI)
(DI) 111or
(01);or
or222
(SI);-

Figure A4.17

Basic string instructions

CX*Ostrings
CMPS
MOVS
Used
with
Meaning
and
are
equal
equal
Repeat
while
notnot
end
of string
CX Prefix
* O and ZF = O
1

Figure A4.18

Prefixes for use with the basic string operations.

Format
CLO
STO
OF
Clear
Set DFOF
Operation
Flags
Meaning
Affected
(OF);-1
(OF);-O
Mnemonic

Figure A4.19
Instructions for selecting autoincrementing and
autodecrementing in string instructions.

"
ACC
=
or DX,Acc
AX
Format
direct
IN
Acc,Port
Acc,DX
OUT
Port,Acc
Meaning
Output
direct
+((DX))
(Acc)
((DX))
(Port)
OperationInput
+++-AL
(Port)
(Acc)
(Acc)
Mnemonic

Figure A4.20

Input/output instructions.

Halt
INT
Wait
IF
Wait
for
an
external
HLT
INTO
IRET
Al!
STI
Format
CL!
None
INT
4(IF)
steps
return
TF,IF
Operation
Clear
Set
Meaning
interrupt
interrupt
flag
flag
((SP))
Type
Interrupt
n-+
software
(IP)
on
overflow
interrupt
0-+
Wait
1
-+
for
TEST
input
Flags
(Flags)
-+
((SP)
- WAIT
2)ton Affected
Mnemonic
(SP)
(CS)
((SP)
(2
(IP)
(4 +
. n)
-+
4+
-+
+.-+
6((SP)
4)
((SP)
n)-+(IP)
-+(SP)
-(Flags)
(CS)
- 6)
4)

Figure A4.21

Interrupt instructions.

Das könnte Ihnen auch gefallen