📄 汇编指令的字节.html
字号:
Example: lidt descriptor[ebx]
<B>LLDT</B> Load local descriptor table register (286+)
operand bytes 286 386 486 Pentium
r16 3 17 20 11 9 NP
mem16 3+d(0-2) 19 24 11 9 NP
Example: lldt ax
<B>LMSW</B> Load machine status word (286+)
operand bytes 286 386 486 Pentium
r16 3 3 10 13 8 NP
mem16 3+d(0-2) 6 13 13 8 NP
Example: lmsw ax
<B>LOCK </B> Lock bus on next instruction (prefix)
bytes 8088 186 286 386 486 Pentium
1 2 2 0 0 1 1 NP
(Note: xchg always is locked whether it is specified or not)
Example: lock mov mem, 1
<B>LODS/LODSB/LODSW/LODSD</B> Load string operand
variations bytes 8088 186 286 386 486 Pentium
lodsb 1 16 10 5 5 5 2 NP
lodsw 1 16 10 5 5 5 2 NP
lodsd 1 - - - 5 5 2 NP
Example: lodsb
<B>LOOP </B> Loop control with CX counter
operand bytes 8088 186 286 386 486 Pentium
short 2 5/17 5/15 4/8+m 11+m 6/7 5/6 NP
<B>loopw short</B> (uses CX in 32-bit mode)
<B>loopd short</B> (uses ECX in 16-bit mode)
Example: loop loop_start
<B>LOOPE/LOOPZ</B> Loop while equal (or zero)
operand bytes 8088 186 286 386 486 Pentium
short 2 6/18 5/16 4/8 11+m 6/9 7/8 NP
<B>loopew short</B> (uses CX in 32-bit mode)
<B>loopzw short</B> (uses CX in 32-bit mode)
<B>looped short</B> (uses ECX in 16-bit mode)
<B>loopzd short</B> (uses ECX in 16-bit mode)
Example: loope loop_start
<B>LOOPNE/LOOPNZ</B> Loop while not equal (or not zero)
operand bytes 8088 186 286 386 486 Pentium
short 2 5/19 5/16 4/8 11+m 6/9 7/8 NP
<B>loopnew short</B> (uses CX in 32-bit mode)
<B>loopnzw short</B> (uses CX in 32-bit mode)
<B>loopned short</B> (uses ECX in 16-bit mode)
<B>loopnzd short</B> (uses ECX in 16-bit mode)
Example: loopne loop_start
<B>LSL</B> Load segment limit (286+)
operands bytes 286 386 486 Pentium
r16, r16 3 14 20/25 10 8 NP
r32, r32 3 - 20/25 10 8
r16, m16 3+d(0,2) 16 21/26 10 8
r32, m32 3+d(0,2) - 21/26 10 8
Example: lsl eax, ebx
<B>LTR </B> Load task register (286+)
operand bytes 286 386 486 Pentium
r16 3 17 23 20 10 NP
mem16 3+d(0,2) 19 27 20 10
Example: ltr ax
<B>MOV</B> Move data
operands bytes 8088 186 286 386 486 Pentium
reg, reg 2 2 2 2 2 1 1 UV
mem, reg 2+d(0-2) 13+EA 9 3 2 1 1 UV
reg, mem 2+d(0-2) 12+EA 12 5 4 1 1 UV
mem, imm 2+d(0-2) 14+EA 12-13 3 2 1 1 UV*
+i(1,2)
reg, imm 2+i(1,2) 4 3-4 2 2 1 1 UV
acc, mem 3 14 8 5 4 1 1 UV
mem, acc 3 14 9 3 2 1 1 UV
* = not pairable if there is a displacement and immediate
Example: mov eax, ebx
Segment Register Moves
Real Mode
operands bytes 8088 186 286 386 486 Pentium
seg, r16 2 2 2 2 2 3 2-11 NP
seg, m16 2+d(0,2) 12+EA 9 5 5 3 3-12 NP
r16, seg 2 2 2 2 2 3 1 NP
m16, seg 2+d(0,2) 13+EA 11 3 2 3 1 NP
Example: mov ds, ax
Protected Mode Differences
operands bytes 286 386 486 Pentium
seg, r16 2 17 18 9 2-11* NP
seg, m16 2+d(0,2) 19 19 9 3-12* NP
* = add 8 if new descriptor; add 6 if SS
MOVE to/from special registers (386+)
operands bytes 386 486 Pentium
r32, cr32 3 6 4 4 NP
cr32, r32 3 4/10* 4/16* 12/22* NP
r32, dr32 3 14/22* 10 2/12* NP
dr32, r32 3 16/22* 11 11/12* NP
r32, tr32 3 12 3/4* - NP
tr32, r32 3 12 4/6* - NP
* = cycles depend on which special register
Example: mov cr0, eax
<B>MOVS/MOVSB/MOVSW/MOVSD</B> Move data from string to string
variations bytes 8088 186 286 386 486 Pentium
movsb 1 18 9 5 7 7 4 NP
movsw 1 26 9 5 7 7 4 NP
movsd 1 - - - 7 7 4 NP
rep movsb 2 9+17n 8+8n 5+4n 7+4n 12+3n* 3+n NP
rep movsw 2 9+25n 8+8n 5+4n 7+4n 12+3n* 3+n NP
rep movsd 2 - - - 7+4n 12+3n* 3+n NP
* = 5 if n=0, 13 if n=1
(n = count of bytes, words or dwords)
Example: rep movsb
<B>MOVSX</B> Move with sign-extend (386+)
operands bytes 386 486 Pentium
reg, reg 3 3 3 3 NP
reg, mem 3+d(0,1,2,4) 6 3 3 NP
(Note: destination reg is 16 or 32-bits; source is 8 or 16 bits)
Example: movsx ebx, ax
<B>MOVZX</B> Move with zero-extend (386+)
operands bytes 386 486 Pentium
reg, reg 3 3 3 3 NP
reg, mem 3+d(0,1,2,4) 6 3 3 NP
(Note: destination reg is 16 or 32-bits; source is 8 or 16 bits)
Example: movzx ebx, ax
<B>MUL</B> Unsigned multiply
operand bytes 8088 186 286 386 486 Pentium
r8 2 70-77 26-28 13 9-14 13-18 11 NP
r16 2 118-133 35-37 21 9-22 13-26 11 NP
r32 2 - - - 9-38 13-42 10 NP
mem8 2+d(0-2) 76-83+EA 32-34 16 12-17 13-18 11 NP
mem16 2+d(0-2) 124-139+EA 41-43 24 12-25 13-26 11 NP
mem32 2+d(0-2) - - - 12-41 13-42 10 NP
implied operand result
multiplicand (multiplier)
AL * byte = AX
AX * word = DX:AX
EAX * dword = EDX:EAX
Example: mul ebx
<B>NEG</B> Two's complement negation
operand bytes 8088 186 286 386 486 Pentium
reg 2 3 3 2 2 1 1 NP
mem 2+d(0-2) 24+EA 13 7 6 3 3 NP
Example: neg eax
<B>NOP </B> No operation
bytes 8088 186 286 386 486 Pentium
1 3 3 3 3 1 1 UV
Example: nop
<B>NOT</B> One's complement negation
operands bytes 8088 186 286 386 486 Pentium
reg 2 3 3 2 2 1 1 NP
mem 2+d(0-2) 24+EA 13 7 6 3 3 NP
Example: not eax
<B>OR</B> Logical inclusive or
operands bytes 8088 186 286 386 486 Pentium
reg, reg 2 3 3 2 2 1 1 UV
mem, reg 2+d(0,2) 24+EA 10 7 7 3 3 UV
reg, mem 2+d(0,2) 13+EA 10 7 6 2 2 UV
reg, imm 2+i(1,2) 4 4 3 2 1 1 UV
mem, imm 2+d(0,2) 23+EA 16 7 7 3 3 UV*
+i(1,2)
acc, imm 1+i(1,2) 4 4 3 2 1 1 UV
* = not pairable if there is a displacement and immediate
Example: or eax, ebx
<B>OUT </B> Output to port
operands bytes 8088 186 286 386 486 Pentium
imm8, al 2 14 9 3 10 16 12 NP
imm8, ax 2 14 9 3 10 16 12 NP
imm8, eax 2 - - - 10 16 12 NP
dx, al 1 12 7 3 11 16 12 NP
dx, ax 1 12 7 3 11 16 12 NP
dx, eax 1 - - - 11 16 12 NP
Protected Mode
operands bytes 386 486 Pentium
imm8, acc 2 4/24/24 11/31/29 9/26/24 NP
dx, acc 1 5/25/25 10/30/29 9/26/24 NP
cycles for: CPL <= IOPL / CPL > IOPL / V86
Example: out dx, al
<B>OUTS/OUTSB/OUTSW/OUTSD </B> Output string to port
variations bytes 186 286 386 486 Pentium
outsb 1 14 5 14 17 13 NP
outsw 1 14 5 14 17 13 NP
outsd 1 - - 14 17 13 NP
Protected Mode
bytes 386 486 Pentium
1 8/28/28 10/32/30 10/27/25 NP
cycles for: CPL <= IOPL / CPL > IOPL / V86
Example: rep outsw
<B>POP </B> Pop a word/dword from the stack
operand bytes 8088 186 286 386 486 Pentium
reg 1 12 10 5 4 1 1 UV
mem 2+d(0-2) 25+EA 20 5 5 6 3 NP
seg 1 12 8 5 7 3 3 NP
FS/GS 2 - - - 7 3 3 NP
Protected Mode
operand bytes 286 386 486 Pentium
CS/DS/ES 1 20 21 9 3-12 NP
SS 1 20 21 9 8-17 NP
FS/GS 2 - 21 9 3-12 NP
Example: pop eax
<B>POPA/POPAD</B> Pop all (186+)/Pop all double (386+)
variations bytes 186 286 386 486 Pentium
popa 1 51 19 24 9 5 NP
popad 1 - - 24 9 5 NP
popa = pop di, si, bp, sp, bx, dx, cx, ax
popad = pop edi, esi, ebp, esp, ebx, edx, ecx, eax
(sp and esp are discarded)
Example: popa
<B>POPF/POPFD</B> Pop flags/Pop flags double (386+)
variations bytes 8088 186 286 386 486 Pentium
popf 1 12 8 5 5 9 6 NP
popfd 1 - - - 5 9 6 NP
Protected Mode
bytes 286 386 486 Pentium
popf 1 5 5 6 4 NP
popfd 1 - 5 6 4 NP
Example: popf
<B>PUSH</B> push a word/dword to the stack
operand bytes 8088 186 286 386 486 Pentium
reg 1 15 10 3 2 1 1 UV
mem 2+d(0-2) 24+EA 16 5 5 4 2 NP
seg 1 14 9 3 2 3 1 NP
imm 1+i(1,2) - - 3 2 1 1 NP
FS/GS 2 - - - 2 3 1 NP
Example: push eax
<B>PUSHA/PUSHAD</B> Push all (186+)/Push all double (386+)
variations bytes 186 286 386 486 Pentium
pusha 1 36 17 18 11 5 NP
pushad 1 - - 18 11 5 NP
pusha = push ax, cx, dx, bx, sp, bp, si, di,
pushad = push eax, ecx, edx, ebx, esp, ebp, esi, edi
Example: pusha
<B>PUSHF/PUSHFD</B> Push flags/Push flags double (386+)
variations bytes 8088 186 286 386 486 Pentium
pushf 1 14 9 3 4 4 9 NP
pushfd 1 - - - 4 4 9 NP
Protected Mode
bytes 286 386 486 Pentium
pushf 1 3 4 3 3 NP
pushfd 1 - 4 3 3 NP
Example: pushf
<B>RCL</B> Rotate bits left with CF
operands bytes 8088 186 286 386 486 Pentium
reg, 1 2 2 2 2 9 3 1 PU
mem, 1 2+d(0,2) 23+EA 15 7 10 4 3 PU
reg, cl 2 8+4n 5+n 5+n 9 8-30 7-24 NP
mem, cl 2+d(0,2) 28+EA+4n 17+n 8+n 10 9-31 9-26 NP
reg, imm 3 - 5+n 5+n 9 8-30 8-25 NP
mem, imm 3+d(0,2) - 17+n 8+n 10 9-31 10-27 NP
Example: rcl eax, 16
<B>RCR</B> Rotate bits right with CF
operands bytes 8088 186 286 386 486 Pentium
reg, 1 2 2 2 2 9 3 1 PU
mem, 1 2+d(0,2) 23+EA 15 7 10 4 3 PU
reg, cl 2 8+4n 5+n 5+n 9 8-30 7-24 NP
mem, cl 2+d(0,2) 28+EA+4n 17+n 8+n 10 9-31 9-26 NP
reg, imm 3 - 5+n 5+n 9 8-30 8-25 NP
mem, imm 3+d(0,2) - 17+n 8+n 10 9-31 10-27 NP
Example: rcr eax, 16
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -