Appendix A
Appendix A
Appendix A
Possible Flag settings are indicated by following symbols. 0 1 m d r AM Not affected Reset Set Modified according to Result Undefined (dont care) Restored from previously stored value Addressing Mode
Addressing Mode No. of Clock Cycles (AM) Direct Mode 6 Indirect Mode 5 Register Relative 9 Based Indexed Base pointer with Destination Index Register Base register with Source Index Register Base Base
7 U V W Pointer with Source Index Register 8 U register with Destination Index Register V W
AM BP BX
SI 8 7
DI 7 8
Appendix A
635
Destination Index Register + Disp source Index Register + Disp source index register + Disp. destination index register + Disp.
7 + 4 = 11 U V W 8 + 4 = 12 U V W
DI 11 12
PUSH
POP
XCHG
IN
OUT
XLAT/ XLATB T r a n s l a t e LEA Load effective address LDS/LES Load pointer using DS/ES LAHF Load AH from flags SAHF Store AH in to flags P U S H F Push flags onto stack POPF Pop flags from stack
r r
r r
r r
r r
r r
ADC
INC
DEC
SUB
SUB
SBB
637
CMP
MUL
IMUL
IDIV
Immediate from register 4 Immediate from memory 17+AM Compare Register to register 3 Memory to register 9+AM Register to memory 16+AM Immediate to register 4 Immediate to memory 4 Immediate to accumulator 17+AM ASCII adjust after addition 4 ASCII adjust after subtraction 4 ASCII adjust after multiplication 83 ASCII adjust after division 60 Decimal adjust accumulator 4 Decimal adjust subtraction 4 Negate Register 3 Memory 16+AM Unsigned multiplication 8-bit register 7077 16-bit register 118133 8-bit memory (7683)+AM 16-bit memory (124139)+AM Integer multiplication 8-bit register 8098 16-bit register 128154 8-bit memory (86104)+AM 16-bit memory (134160)+AM Convert byte to word 2 Convert word to double word 5 Unsigned division 8-bit register 8090 16-bit register 144162 8-bit memory (8696)+AM 16-bit memory (150168)+AM Integer division 8-bit register 101112 16-bit register 165184 8-bit memory (107118)+AM 16-bit memory (171190)+AM
d d d d d d m
d d m m m m m
d d m m m m m
m m d d m m m
d d m m m m m
m m d d m m m
OR
m m
NOT
XOR
TEST
RET
639
I 0
T 0
Interrupt Type = 3 52 Type 3 51 INTO Interrupt if overflow Interrupt if taken 53 Interrupt if not taken 4 JMP Jump Intrasegment direct short 15 Intrasegment direct 15 Intersegment direct 15 Intrasegment indirect 18+AM through memory Intrasegment indirect 11 through register Intersegment indirect 24+AM IRET Return from Interrupt 24 JZ/JE Jump if not zero/ 16/4 Jump if not equal JNX/ Jumps if not zero/ 16.4 JNE Jumps if not equal JS Jump if sign 16/4 JNS Jump if not sign 16/4 JO Jump of overflow 16/4 JNO Jump if not overflow 16/4 J P / J P E Jump if parity/ 16/4 Jump if parity even J N P / J P O Jump if not parity/Jump 16/4 if parity odd JB/ J N A E / J C Jump if below/Jump if not 16/4 above or equal/Jump if carry JNB/ J A E / J N C Jump if not below/Jump if 16/4 above or equal/Jump if not carry J B E / J N A Jump if below or equal/ 16/4 Junp if not above J N B E / J A Jump if not below or equal/ 16/4 Jump if above JL/ JNGE Jump if less/ 16/4 Jump if not greater or equal J N L / J G E Jump if not less/ 16/4 Jump if greater or equal J L E / J N G Jump if less or equal/ 16/4 Jump if not greater J N L E / J G Jump if not less or equal/ 16/4 Jump if greater JCXZ Jump if CX is zero 18/6
2 3 5 24 2 24 1 2 2 2 2 2 2 2 2
2 2 2
2 2 2 2 2
19/5
SHL/SAL Shift Logical Left/ Shift arithmetic Left Register with single shift 2 2 Register with variable shift 8+4/bit 2 Memory with single shift 15+AM 24 Memory with variable shift(20+AM)+4/bit 24 SHR Shift logical right Register with single shift 2 2 Register with variable shift 8 + 4/bit 2
m m
641
SAR
ROR
RO L
RCR
RCL
Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit Shift arithmetic right Register with single shift 2 Register with variable shift 8 + 4/bit Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit Rotate right without carry Register with single shift 2 Register with variable shift 8 + 4 bit Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit Rotate left Register with single shift 2 Register with variable shift 8 + 4/bit Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit Rotate right through carry Register with single shift 2 Register with variable shift 8 + 4/bit Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit Rotate left through carry Register with single shift 2 Register with variable shift 8 + 4/bit Memory with single shift 15+AM Memory with variable shift(20+AM)+4/bit
CMPS/ Compare string/compare CMPSB byte string/compare word CMPSW s t r i n g Not repeated Repeated MOVS/ Move string/move MOVSB/ byte string/move MOVSW Word string Not repeated Repeated LODS/ Load string/Load LODSB/ String byte/Load LODSW String word Not repeated Repeated
22 9+22/rep 1
18 9+17/rep 1
12 9+13/rep
SCAS/ Scan string/ SCASB/ Scan byte string/ SCASW Scan word string Not repeated Repeated STOS/ Store string/ STOSB/ Store byte string/ STOSW Store word string Not repeated Repeated
15 9+15/rep 1
m m
11 9+10/rep