Title: ??:INC reg/mem
13) ?1??INC(??????)
- ??INC reg/mem
- ?????C??????????????1
- ? INC AL
- INC SI
- INC BYTE PTRBX4
- ???????CF???
2ADD/ADC??????(CF/OF/ZF/SF)???
CF????????????? OF?????????????
32. ????
- (1) ??????????SUB
- ?? SUB dest, src
- ?? dest?(dest)-(src)
- ?1.??????????????????
- 2.????????????
- ????
- SUB AL,60H
- SUB BX20H,DX
- SUB AX,CX
4(2) ?????????SBB
- SBB?????????????
- ?? SBB dest, src
- ?? dest?(dest)-(src)-(CF)
- ????
- SBB AX,CX
- SBB WORD PTRSI,2080H
- SBB SI,DX
5?x?y?z??32??,????????X, X2Y,Y2Z,Z2??????,???
????w?xy24-z,????W, W2???? MOV AX, X
MOV DX, X2 ADD AX, Y ADC DX,
Y2 xy ADD AX, 24 ADC DX,
0 xy24 SUB AX, Z SBB
DX, Z2 xy24-z MOV W, AX
MOV W2, DX ????W, W2??
6(3) ?1??DEC
- ?????C????--????
- ??DEC opr
- ??opr?(opr)-1
- ????
- DEC CL
- DEC BYTE PTRDI2
- DEC SI
7(4) ????NEG
- ?? NEG opr
- ?? opr? 0-(opr)
- ?????????????0??????,???NEG????????????
- ??(AL)0FCH,??? NEG AL ?,
- (AL)04H,CF1
- ???,0FCH?-4???,???????,???4(-4????)?
8SUB/SBB????(CF/OF/ZF/SF)???
CF1??????????? OF1??????????? NEG???CF/
OF??? CF????0?,??????CF0,??CF1?
OF?????-128???????-32768???OF1,
??OF0?
9(5) ????CMP
- ?? CMP dest, src
- ?? (dest)-(src)
- CMP???????????,??????????,????????????
- ????
- CMP AL,0AH
- CMP CX,SI
- CMP DI,BX03
10?????????????
- 1)??ZF???????????ZF1,??????
- 2)???????,????????
- ???????????
- ?CF0,?destgtsrc
- ?CF1,?destltsrc?
- ???????????
- ?OF?SF0,?destgtsrc
- ?OF?SF1,?destltsrc?
11- ????????,???????????????,??????????
- ????AL?BL?CL????????,?
- ?????AL??
- ??
- CMP AL,BL AL?BL??
- JNG BBB ?ALBL,??
- XCHG AL,BL ?ALgtBL,???
- BBB CMP AL,CL AL?CL??
- JNG CCC ?ALCL,??
- XCHG AL,CL ?ALgtCL,???
- CCC HLT
123. ????
- ?????8?8??16???
- 16?16??32???
- (1) ?????????MUL(MEM/REG)
- ?? MUL src
- ??????? (AX) ? (AL) (src)
- ???? (DX, AX) ? (AX) (src)
- ????
- MUL BL (AL)(BL),???AX?
- MUL CX (AX)(CX),???DX,AX?
- MUL BYTE PTRBX
13(2) ????????IMUL
- ???MUL????,???????????????
- ????
- IMUL BL (AX)?(AL)(BL)
- IMUL WORD PTRSI
- (DX,AX)?(AX)(SI1SI)
??MUL/IMUL??? ? AL(AX)????????? ?
AX(DX,AX)????????? ? SRC?????? ?
?CF?OF?,??????????
14?????CF/OF???
?(AL) A5H(-5B),(BL) 11H (1) IMUL
BL (AX) ? (AL)(BL)
A511 ? -5B11-060B
? F9F5
(AX) F9F5H CFOF1 (2) MUL BL
(AX) ? (AL)(BL)
A511 0AF5
(AX) 0AF5H CFOF1
154. ????
- ?????16?/8??8??
- 32?/16??16??
- ????????????????
- ??? ? ??
- ???? AX AL AH
- ??? DXAX AX DX
16(1) ????????DIV
- ?? DIV src
- ?????? (AL) ? (AX) / (SRC) ??
- (AH) ? (AX) /
(SRC) ??? - ??? (AX) ? (DX, AX) / (SRC) ??
- (DX) ? (DX, AX) /
(SRC) ??? - ????
- DIV CL
- DIV WORD PTRBX
- ???????AL????FFH(?AX????FFFFH),?CPU??????0??????
17(2) ????????IDIV
- ?? IDIV src
- ???DIV?????????????,????????????????
- ?? ??DIV/IDIV??
- AX(DX,AX)???????????
- AL(AX)?????????
- AH(DX)??????????
- src???????
- ?????????????
18??????????????
- ???????????????????,??????????????,???????
- ??????????,???AH?DX?????
- ???????,????????????????????????CBW?CWD
19? ??34H25H?????
- MOV AL,34H
- MOV BL,25H
- CBW AL??????AH
- IDIV BL 0034H25H,???
- (AH)0FH,
(AL)01H
205.BCD???????????
- ????BCD??????????
- ??AAA?DAA?AAS?DAS?AAM?AAD
- ??????,???????AL?AH
- ????BCD???????????
- BCD?????????,?????????????????????(????)????,
?????????????
211)??????????
- (1)???BCD?????AAA
- ?????AL?????????BCD???????????,???????????BCD??
- AAA?????AF?CF,????????
- AAA??????ADD?ADC?????
22AAA???????
- ??AL??4?gt9?AF1,?
- ? AL?(AL)6,(AH)?(AH)1,AF?1
- ? AL?((AL)?0FH)
- ? CF?AF
- ??AL?(AL)?0FH
23- ??????????
- ??89 0000 1000
- ??? 0000 1001
- 0001 0001 11
-
- ????17,???????11,?????????,????4???4??????(??AF1)
??????????,?BCD???????,????????,?????6,??????6???
??1???16,???????10,????6?
24- ?????4????gt9(?AF??)?,?????6?? (?????????,???6????
?????) ? - ??????????6
- 0001 0001 11
- 0000 0110 6
- 0000 0111 17
- 0000 1111
- ----------------------
- 1 0000 1111
25- ?2?????????????,2658?
- 3619,???????26583619?
-
- ????,????????????ASCII??????????
- ??????????????,????,???5???????????
- ??????????????
26STRING1
38H
8
???
35H
5
36H
6
32H
2
...
STRING2
9
39H
???
31H
??
1
36H
6
33H
3
...
SUM
??
27- ????
- LEA SI,STRING1 STRING1?????SI
- LEA DI,STRING2 STRING2?????DI
- LEA BX,SUM SUM?????BX
- MOV CX,4 ??4?
- CLC ?????
- AGAINMOV AL,SI
- ADC AL,DI ????
- AAA ???BCD???
- MOV BX,AL ????SUM
- INC SI ????
- INC DI
- INC BX
- DEC CX ??????1
- JNZ AGAIN ?????,??AGAIN
28- ???
- 1.????????SUM???
- 2.???????,???????
- 3.???????,?AAA?????????????????????,??????????AS
CII????????AAA????????BCD???????,???ASCII?????????
????(??AAA??????)
29(2)??BCD?????DAA
- ????BCD??????AL?,??DAA???????????BCD?.
- ????(????)
- ?AL??4?gt9?AF1
- ?(AL)?(AL)6,AF?1
- ?AL??4?gt9?CF1
- ?(AL)?(AL)60H,CF?1
- ?OF?,DAA???????????
- DAA??????ADD?ADC?????
30- ? 0100 1000
48H - MOV AL,48H 0111 0100 74H
- MOV BL,74H 1011 1100 BCH
- ADD AL,BL 0110 0110 66H
- DAA 1 0010 0010 1 22H
- (??) (??)
- ??ADD?,(AL)BCH,?4??4????9,?DAA?????66H??,?????
- (AL)22H, CF1, AF1
312)??????????
- (1)???BCD???????????AAS
- ?AL????????BCD????????????????
- ?AL??4?gt9?AF1,?
- ? AL?(AL)-6,AH?(AH)-1,AF?1
- ? AL?(AL)?0FH
- ? CF?AF
- ??AL?(AL)?0FH
32- ??16-8?
- MOV AX,0106H 0000 0110 06
- MOV BL,08H - 0000 1000 - 08
- SUB AL,BL 1111 1110 FE
- AAS - 0000 0110 - 06
- 1111 1000 F8
- ?0000 1111 ?0F
- 0000 1000 08
- ???(AL)08H,(AH)0,CFAF1
33- (2)??BCD???????????DAS
- ?AL??????BCD????????????????
- ?AL??4?gt9?AF1,?
- AL?(AL)-6, ?AF?1
- ?AL??4?gt9?CF1,?
- AL?(AL)-60H,?CF?1
-
- DAS?OF???,?????????
- DAS?????????????
34- 3) ??????????AAM
- ?AX???????BCD????????????????
- (AL)/0AH, (AH)??,(AL)???
- ?????????AL?AH
- AAM??MUL??????
- ?????PF?SF?ZF,?????
- ?AAM???99??-??????
35- ?1????????78?
- ?????
- MOV AL,07H (AL)07H
- MOV CL,08H (CL)08H
- MUL CL (AX)0038H
- AAM (AH)05H,(AL)06H
- ?????????BCD??
- ?2?3AH???????????
- MOV AL,3AH 58
- AAM (AH)05H,(AL)08H
364) ??????????AAD
- ????BCD??????????????
- (AL)?(AH)0AH(AL)
- AH ? 0
- ?????????AH,AL
- AAD??DIV??????
- ?????PF?SF?ZF,?????
- ?AAD???99??-??????
37- ?1????????557?
- ?????
- MOV AX, 0505H (AX)55BCD
- MOV CL, 07H (CL) 7
- AAD (AX)0037H
- DIV CL (AH)6, (AL)7
- ?????????BCD?(?7?6)?
- ?2?73???????????
- MOV AX, 0703H (AX) 73BCD
- AAD (AX) 0049H