3 ݴ
ϰ3.1
1ʹö8λ257жӦı
2ַ'F'ֵ46HΪMOVָԴ
3ΪʲôָMOV AX, (3467H)*3еֵʽdz 4ֵ500ܹΪֽڱijֵ
5Ϊʲô˵XCHG EDX,CXһָ
6ǻȡƫƵַΪʲôָLEA EBX, [ESI]ȷָMOV EBX, OFFSET[ESI]ʹ
7INCDECNEGNOTǵָӦԴĿIJ 8Сдĸתʹʲôɣ
9˳зֲָֻͬһָļӼз㣿
10ΪʲôҲΪˣ
ûСʹö8λ257ûжӦı롣 ַ'F'ASCIIֵ46Hû
ڻжֵʽ㣬õһȷֵʳֵʽΪ ܡֵ500һֽܱԲΪֽڱֵ ԴĿĴλͬøָݽ
ǰִָʱƫƵַȷģߵOFFSETֻڻλƫƵַʱĴDz֪ģƫƵַ
INCDECNEGNOTָIJԴҲĿIJ СдĸתǵASCII20H
Ӽзֱñ־ĴCFOF־CFOF
ƶƵij˷ԳΪˡ ϰ3.3
1ֽڱαָǷ_____________ȡеƫƵַIJ_____________
2һ01100001롣Ϊ10___________ΪBCD룬ʾֵ_____________ijASCII룬ַ__________
3Cá\\nʾùصһλڻҪַһǻسASCII_____________ƶǰеλһǻУASCII_____________ƵһС
4ݶ䡰H8843 DWORD 99008843HָMOV CX, WORD PTR H8843ִкCX_____________
5DWORDһXYZ_____________áTYPE XYZõֵΪ_____________ʹãӦ_____________˵
6ݶ䡰ABC BYTE 1,2,3ָMOV CL, ABC+2ִкCL_____________ 73-9TABǡ1234567890ʾ__________ 8ָXOR EAX, EAX͡SUB EAX, EAXִкEAX__________CFOF__________ָMOV EAX, 0ִкEAX__________CFOFûб仯
93-15ִнQVAR__________BCD__________
10EDXڵ16ʹָSHR EDX, __________кһһ
BYTEOFFSET 9761Сдĸa
5
0DH130AH10 8843H
DWORD4WORD PTR XYZ 3
78894111 000
0123456788765432H83H 4 ϰ3.4
ʮʾתΪʮʽֵ FFH 0H 5EH EFH
255 0 94 239 ϰ3.7
ʮ8λƲʾ 0 127 ۣ127 57
00000000 01111111 10000001 11000111 ϰ3.8
ʮݵļӼ㣬˵Ƿнλλ 1234H7802H F034H5AB0H C051H1234H 9876HABCDH
1234H7802H8A36Hλ F034H5AB0H4AF4Hнλ C051H1234HBE1DHλ 9876HABCDHECA9Hнλ ϰ3.9
09дĸAZСдĸazӦASCIIֱǶ٣ASCII0DH0AHֱӦʲôַ
09ӦASCII30H39H
дĸAZӦASCIIǣ41H5AH СдĸazӦASCIIǣ617AH ASCII0DH0AHֱӦǻسͻַ ϰ3.10
һݶΣҪų my1bΪַPersonal Computer my2bΪʮʾֽڱ20 my3bΪʮʾֽڱ20
6
my4bΪöʾֽڱ20 my5wΪ20δֱֵ my6cΪ100ij
my7cʾַPersonal Computer my1b my2b my3b my4b my5w my6c my7c
byte 'Personal Computer' byte 20 byte 14h
byte 00010100b word 20 dup(?) = 100
equ
ϰ3.16
ʹMOVָʵָֽXCHG EBX,[EDI]ܡ
push eax mov eax,ebx mov ebx,[edi] mov [edi],eax pop eax
; û
; û
ϰ3.17
赱ǰESP0012FFB0H˵ÿָESPڶ٣
push eax push dx
push dword ptr 0f79h pop eax
pop word ptr [bx] pop ebx
ESP0012FFACH ESP0012FFAAH ESP0012FFA6H ESP0012FFAAH ESP0012FFACH ESP0012FFB0H
ϰ3.19ֱһָ¹ܣ
1EBXĴEDXĴӣEDXĴ
2üĴEBXESIĻַַѰַʽѴ洢һֽALĴӣѽ͵ALС
3EBXλ0B2HļĴѰַʽѴ洢еһ˫ֺECXĴӣѽͻش洢С
432λVARD3412Hӣѽͻظô洢ԪС 50A0HEAXĴӣѽͻEAXС
add edx,ebx
add al,[ebx+esi] add [bx+0b2h],cx add varw,3412h
7
add eax,0a0h
иִָкALֵԼCFZFSFOFPF״̬
mov al,89h add al,al add al,9dh cmp al,0bch sub al,al dec al inc al
mov al,89h add al,al add al,9dh cmp al,0bch sub al,al dec al inc al
; AL89H ; AL12H ; AL0AFH ; AL0AFH ; AL00H ; AL0FFH ; AL00H
CF ZF 1 0 0 0 1 0 0 1 0 0 0 1
SF 0 1 1 0 1 0
OF 1 0 0 0 0 0
PF 1 1 1 1 1 1
ϰ3.21
ϰ3.28̽һѹBCD92HתΪӦASCII룬ȻDISPCӳӳУʾ bcd
; ݶ byte 92h ; mov al,bcd shr al,4 add al,30h call dispc mov al,bcd and al,0fh add al,30h call dispc
4 Գ
ϰ4.1
1ʲôصĿַѰַʽӦࣿ 2ʲôżУ飿
3ΪʲôжСзŴСתָͬ 4˫֧ṹ֧֮JMPָʲôã 5ΪʲôرǿΪӳϱҪעͣ
6ӳöջݲΪʲôҪرעջƽ⣿ 7ݵġֵַ͡ʲô 8INCLUDEINCLUDELIBʲô 9ϱʲôƣ
10WindowsʱΪʲôʾijDLLļڣ
ͬһϵͳŵͬĴ洢ִʱָλûиı䣬ĿַѰַɷϵͳȡ
8