📄 汇编指令的字节.html
字号:
<B>ROL</B> Rotate bits left
operands bytes 8088 186 286 386 486 Pentium
reg, 1 2 2 2 2 3 3 1 PU
mem, 1 2+d(0,2) 23+EA 15 7 7 4 3 PU
reg, cl 2 8+4n 5+n 5+n 3 3 4 NP
mem, cl 2+d(0,2) 28+EA+4n 17+n 8+n 7 4 4 NP
reg, imm 3 - 5+n 5+n 3 2 1 PU
mem, imm 3+d(0,2) - 17+n 8+n 7 4 3 PU*
* = not pairable if there is a displacement and immediate
Example: rol eax, 16
<B>ROR</B> Rotate bits right
operands bytes 8088 186 286 386 486 Pentium
reg, 1 2 2 2 2 3 3 1 PU
mem, 1 2+d(0,2) 23+EA 15 7 7 4 3 PU
reg, cl 2 8+4n 5+n 5+n 3 3 4 NP
mem, cl 2+d(0,2) 28+EA+4n 17+n 8+n 7 4 4 NP
reg, imm 3 - 5+n 5+n 3 2 1 PU
mem, imm 3+d(0,2) - 17+n 8+n 7 4 3 PU*
* = not pairable if there is a displacement and immediate
Example: ror eax, 16
<B>RDMSR</B> Read from model specific register (Pentium+)
bytes Pentium
2 20-24 NP
Example: rdmsr
<B>REP</B> Repeat string operation
See: MOVS (rep movs) move block
See: STOS (rep stos) fill block
<B>REPE</B> Repeat while equal (or zero) string operation
See: CMPS (repe cmps) find non-matching memory items
See: CMPS (repe scas) find non-acc matching byte in memory
<B>REPNE</B> Repeat while not equal (or not zero) string operation
See: CMPS (repne cmps) find first matching memory items
See: SCAS (repne scas) find first matching memory item to acc
<B>RET/RETN/RETF</B> Return from procedure
variations/
operands bytes 8088 186 286 386 486 Pentium
retn 1 20 16 11+m 10+m 5 2 NP
retn imm16 1+d(2) 24 18 11+m 10+m 5 3 NP
retf 1 34 22 15+m 18+m 13 4 NP
retf imm16 1+d(2) 33 25 15+m 18+m 14 4 NP
RET is coded by the assembler as near or far based on the
procedure declaration and program model, as:
RETN (return near)
RETF (return far)
Example: ret
Protected Mode
variations/
operands bytes 286 386 486 Pentium
retf 1 25+m/55 32+m/62 18/33 4-13/23 NP
retf imm16 1+d(2) 25+m/55 32+m/68 17/33 4-13/23 NP
cycles for: same privilege level/lower privilege level
<B>RSM</B> Resume from system management mode (Pentium+)
bytes Pentium
2 83 NP
Example: rsm
<B>SAL/SHL/SAR/SHR</B> Shift bits
operands bytes 8088 186 286 386 486 Pentium
reg, 1 2 2 2 2 3 3 1 PU
mem, 1 2+d(0,2) 23+EA 15 7 7 4 3 PU
reg, cl 2 8+4n 5+n 5+n 3 3 4 NP
mem, cl 2+d(0,2) 28+EA+4n 17+n 8+n 7 4 4 NP
reg, imm 3 - 5+n 5+n 3 2 1 PU
mem, imm 3+d(0,2) - 17+n 8+n 7 4 3 PU*
* = not pairable if there is a displacement and immediate
sal = shift arithmetic left sar = shift arithmetic right
shl = shift left (same as sal) shr = shift right
Example: shl eax, 1
<B>SAHF</B> Store AH into flags
bytes 8088 186 286 386 486 Pentium
1 4 3 2 3 2 2 NP
Example: sahf
<B>SBB</B> Integer subtraction with borrow
operands bytes 8088 186 286 386 486 Pentium
reg, reg 2 3 3 2 2 1 1 PU
mem, reg 2+d(0,2) 24+EA 10 7 7 3 3 PU
reg, mem 2+d(0,2) 13+EA 10 7 6 2 2 PU
reg, imm 2+i(1,2) 4 4 3 2 1 1 PU
mem, imm 2+d(0,2) 23+EA 16 7 7 3 3 PU*
+i(1,2)
acc, imm 1+i(1,2) 4 4 3 2 1 1 PU
* = not pairable if there is a displacement and immediate
Example: sbb eax, ebx
<B>SCAS/SCASB/SCASW/SCASD</B> Scan string data
variations bytes 8088 186 286 386 486 Pentium
scasb 1 19 15 7 7 6 4 NP
scasw 1 19 15 7 7 6 4 NP
scasd 1 - - - 7 6 4 NP
repX scasb 2 9+15n 5+15n 5+8n 5+8n 7+5n* 8+4n NP
repX scasw 2 9+19n 5+15n 5+8n 5+8n 7+5n* 8+4n NP
repX scasd 2 - - - 5+8n 7+5n* 8+4n NP
repX = repe or repz or repne or repnz
* = 5 if n=0
(n = count of bytes, words or dwords)
Example: repne scasb
<B>SET</B> Set byte to 1 on condition else set to 0 (386+)
operand bytes 386 486 Pentium
r8 3 4 4/3 1/2 NP
mem8 3+d(0-2) 5 3/4 1/2 NP
Cycles are for: true/false
setCC = one of:
seta setae setb setbe setc sete
setg setge setl setle setna setnae
setnb setnbe setnc setne setng setnge
setnl setnle setno setnp setns setnz
seto setp setpe setpo sets setz
Example: setne al
<B>SGDT </B> Store global descriptor table register (286+)
operand bytes 286 386 486 Pentium
mem48 5 11 9 10 4 NP
Example: sgdt descriptor[ebx]
<B>SIDT</B> Store interrupt descriptor table register (286+)
operand bytes 286 386 486 Pentium
mem48 5 12 9 10 4 NP
Example: sidt descriptor[ebx]
<B>SHLD</B> Double precision shift left (386+)
operands bytes 386 486 Pentium
reg, reg, imm 4 3 2 4 NP
mem, reg, imm 4+d(0-2) 7 3 4 NP
reg, reg, cl 4 3 3 4 NP
mem, reg, cl 4+d(0-2) 7 4 5 NP
Example: shld eax, ebx, 16
<B>SHRD</B> Double precision shift right (386+)
operands bytes 386 486 Pentium
reg, reg, imm 4 3 2 4 NP
mem, reg, imm 4+d(0-2) 7 3 4 NP
reg, reg, cl 4 3 3 4 NP
mem, reg, cl 4+d(0-2) 7 4 5 NP
Example: shrd eax, ebx, 16
<B>SLDT</B> Store local descriptor table register (286+)
operands bytes 286 386 486 Pentium
r16 3 2 2 2 2 NP
mem16 3+d(0-2) 3 2 3 2 NP
Example: sldt ax
<B>SMSW</B> Store machine status word (286+)
operands bytes 286 386 486 Pentium
r16 3 2 2 2 4 NP
mem16 3+d(0-2) 3 3 3 4 NP
Example: smsw ax
<B>STC</B> Set the carry flag
bytes 8088 186 286 386 486 Pentium
1 2 2 2 2 2 2 NP
Example: stc
<B>STD</B> Set direction flag (set to reverse string direction)
bytes 8088 186 286 386 486 Pentium
1 2 2 2 2 2 2 NP
Example: std
<B>STI</B> Set interrupt flag (enable)
bytes 8088 186 286 386 486 Pentium
1 2 2 2 3 5 7 NP
Example: sti
<B>STOS/STOSB/STOSW/STOSD</B> Store string data
variations bytes 8088 186 286 386 486 Pentium
stosb 1 11 10 3 4 5 3 NP
stosw 1 15 10 3 4 5 3 NP
stosd 1 - - - 4 5 3 NP
rep stosb 2 9+10n 6+9n 4+3n 5+5n 7+4n* 3+n NP
rep stosw 2 9+14n 6+9n 4+3n 5+5n 7+4n* 3+n NP
rep stosd 2 - - - 5+5n 7+4n* 3+n NP
* = 5 if n=0, 13 if n=1
(n = count of bytes, words or dwords)
Example: rep stosd
<B>STR</B> Store task register (286+)
operand bytes 286 386 486 Pentium
r16 3 2 2 2 2 NP
mem16 3+d(0-2) 3 2 3 2 NP
Example: str bx
<B>SUB</B> Integer subtraction
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: sub eax, ebx
<B>TEST</B> Logical compare
operands bytes 8088 186 286 386 486 Pentium
reg, reg 2 3 3 2 2 1 1 UV
mem, reg 2+d(0,2) 13+EA 10 6 5 2 2 UV
reg, mem 2+d(0,2) 13+EA 10 6 5 2 2 UV
reg, imm 2+i(1,2) 5 4 3 2 1 1 UV
mem, imm 2+d(0,2) 11+EA 10 6 5 2 2 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: sub eax, ebx
<B>VERR</B> Verify a segment for reading (286+)
operand bytes 286 386 486 Pentium
r16 3 14 10 11 7 NP
mem16 3+d(0,2) 16 11 11 7 NP
Example: verr ax
<B>VERW</B> Verify a segment for writing (286+)
operand bytes 286 386 486 Pentium
r16 3 14 15 11 7 NP
mem16 3+d(0,2) 16 16 11 7 NP
Example: verr ax
<B>WAIT </B> Wait for co-processor
bytes 8088 186 286 386 486 Pentium
1 4 6 3 6 1-3 1 NP
Example: wait
<B>WBINVD</B> Write-back and invalidate data cache (486+)
bytes 486 Pentium
2 5 2000+ NP
Example: wbinvd
<B>WRMSR</B> Write to model specific register (PENTIUM+)
bytes Pentium
2 30-45 NP
Example: wrmsr
<B>XADD</B> Exchange and add (486+)
operands bytes 486 Pentium
reg, reg 3 3 3 NP
mem, reg 3+d(0-2) 4 4 NP
Example: xadd eax, ebx
<B>XCHG</B> Exchange register/memory with register
operands bytes 8088 186 286 386 486 Pentium
reg, reg 2 4 4 3 3 3 3 NP
reg, mem 2+d(0-2) 25+EA 17 5 5 5 3 NP
mem, reg 2+d(0-2) 25+EA 17 5 5 5 3 NP
acc, reg 1 3 3 3 3 3 2 NP
reg, acc 1 3 3 3 3 3 2 NP
in above: acc = AX or EAX only
Example: xchg ax, dx
<B>XLAT/XLATB</B> Table look-up translation
bytes 8088 186 286 386 486 Pentium
1 11 11 5 5 4 4 NP
Example: xlat
<B>XOR</B> Logical exclusive 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: xor eax, ebx</PRE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -