51單片機常用匯編語言助記符英文全稱
(1)數(shù)據(jù)傳送類指令(7種助記符)
MOV(英文為Move):對內(nèi)部數(shù)據(jù)寄存器RAM和特殊功能寄存器SFR的數(shù)據(jù)進行傳送;
MOVC(Move Code)讀取程序存儲器數(shù)據(jù)表格的數(shù)據(jù)傳送;
MOVX (Move External RAM) 對外部RAM的數(shù)據(jù)傳送;
XCH (Exchange) 字節(jié)交換;
XCHD (Exchange low-order Digit) 低半字節(jié)交換;
PUSH (Push onto Stack) 入棧;
POP (Pop from Stack) 出棧;
(2)算術(shù)運算類指令(8種助記符)
ADD(Addition) 加法;
ADDC(Add with Carry) 帶進位加法;
SUBB(Subtract with Borrow) 帶借位減法;
DA(Decimal Adjust) 十進制調(diào)整;
INC(Increment) 加1;DEC(Decrement) 減1;
MUL(Multiplication、Multiply) 乘法;
DIV(Division、Divide) 除法;
(3)邏輯運算類指令(10種助記符)
ANL(AND Logic) 邏輯與;
XRL(Exclusive-OR Logic) 邏輯異或;
CLR(Clear) 清零;CPL(Complement) 取反;
RL(Rotate left) 循環(huán)左移;
RLC(Rotate Left throught the Carry flag) 帶進位循環(huán)左移;
RR(Rotate Right) 循環(huán)右移;
RRC (Rotate Right throught the Carry flag) 帶進位循環(huán)右移;
SWAP (Swap) 低4位與高4位交換;
(4)控制轉(zhuǎn)移類指令(17種助記符)
ACALL(Absolute subroutine Call)子程序絕對調(diào)用;
LCALL(Long subroutine Call)子程序長調(diào)用;
RET(Return from subroutine)子程序返回;
RETI(Return from Interruption)中斷返回;
SJMP(Short Jump)短轉(zhuǎn)移;LJMP長轉(zhuǎn)移;
AJMP(Absolute Jump)絕對轉(zhuǎn)移;
CJNE (Compare Jump if Not Equal)比較不相等則轉(zhuǎn)移;
DJNZ (Decrement Jump if Not Zero)減1后不為0則轉(zhuǎn)移;
JZ (Jump if Zero)結(jié)果為0則轉(zhuǎn)移;
JNZ (Jump if Not Zero) 結(jié)果不為0則轉(zhuǎn)移;
JC (Jump if the Carry flag is set)有進位則轉(zhuǎn)移;
JNC (Jump if Not Carry)無進位則轉(zhuǎn)移;
JB (Jump if the Bit is set)位為1則轉(zhuǎn)移;
JNB (Jump if the Bit is Not set) 位為0則轉(zhuǎn)移;
(3)JBC(Jump if the Bit is set and Clear the bit) 位為1則轉(zhuǎn)移,并清除該位;
NOP (No Operation) 空操作;
(5)位操作指令(1種助記符)
SETB(Set Bit) 位 置1 。
1.通用數(shù)據(jù)傳送指令.
MOV----> move
MOVSX---->extended move with sign data
MOVZX---->extended move with zero data
PUSH---->push POP---->pop
PUSHA---->push all
POPA---->pop all
PUSHAD---->push all data
POPAD---->pop all data
BSWAP---->byte swap
XCHG---->exchange
CMPXCHG---->compare and change
XADD---->exchange and add
XLAT---->translate
2.輸入輸出端口傳送指令.
IN---->input
OUT---->output
3.目的地址傳送指令.
LEA---->load effective address
LDS---->load DS
LES---->load ES
LFS---->load FS
LGS---->load GS
LSS---->load SS
4.標志傳送指令.
LAHF---->load AH from flag
SAHF---->save AH to flag
PUSHF---->push flag POPF---->pop flag
PUSHD---->push dflag POPD---->pop dflag
[!--empirenews.page--]
二、算術(shù)運算指令
ADD---->add
ADC---->add with carry
INC---->increase 1
AAA---->ascii add with adjust
DAA---->decimal add with adjust
SUB---->substract
SBB---->substract with borrow
DEC---->decrease 1
NEC---->negative
CMP---->compare
AAS---->ascii adjust on substract
DAS---->decimal adjust on substract
MUL---->multiplication
IMUL---->integer multiplication
AAM---->ascii adjust on multiplication
DIV---->divide
IDIV---->integer divide
AAD---->ascii adjust on divide
CBW---->change byte to word
CWD---->change word to double word
CWDE---->change word to double word with sign to EAX
CDQ---->change double word to quadrate word
三、邏輯運算指令
AND---->and
OR---->or
XOR---->xor
NOT---->not
TEST---->test
SHL---->shift left
SAL---->arithmatic shift left
SHR---->shift right
SAR---->arithmatic shift right
ROL---->rotate left
ROR---->rotate right
RCL---->rotate left with carry
RCR---->rotate right with carry
四、串指令
MOVS---->move string
CMPS---->compare string
SCAS---->scan string
LODS---->load string
STOS---->store string
REP---->repeat
REPE---->repeat when equal
REPZ---->repeat when zero flag
REPNE---->repeat when not equal
REPNZ---->repeat when zero flag
REPC---->repeat when carry flag
REPNC---->repeat when not carry flag
五、程序轉(zhuǎn)移指令
1>無條件轉(zhuǎn)移指令(長轉(zhuǎn)移)
JMP---->jump
CALL---->call
RET---->return
RETF---->return far
2>條件轉(zhuǎn)移指令(短轉(zhuǎn)移,-128到+127的距離內(nèi))
JAE---->jump when above or equal
JNB---->jump when not below
JB---->jump when below
JNAE---->jump when not above or equal
JBE---->jump when below or equal
JNA---->jump when not above
JG---->jump when greater
JNLE---->jump when not less or equal
JGE---->jump when greater or equal
JNL---->jump when not less
JL---->jump when less
JNGE---->jump when not greater or equal
JLE---->jump when less or equal
JNG---->jump when not greater
JE---->jump when equal
JZ---->jump when has zero flag
JNE---->jump when not equal
JNZ---->jump when not has zero flag
JC---->jump when has carry flag
JNC---->jump when not has carry flag
JNO---->jump when not has overflow flag
JNP---->jump when not has parity flag
JPO---->jump when parity flag is odd
JNS---->jump when not has sign flag
JO---->jump when has overflow flag
JP---->jump when has parity flag
JPE---->jump when parity flag is even
JS---->jump when has sign flag
[!--empirenews.page--]
3>循環(huán)控制指令(短轉(zhuǎn)移)
LOOP---->loop
LOOPE---->loop equal
LOOPZ---->loop zero
LOOPNE---->loop not equal
LOOPNZ---->loop not zero
JCXZ---->jump when CX is zero
JECXZ---->jump when ECX is zero
4>中斷指令
INT---->interrupt
INTO---->overflow interrupt
IRET---->interrupt return
5>處理器控制指令
HLT---->halt
WAIT---->wait
ESC---->escape
LOCK---->lock
NOP---->no operation
STC---->set carry
CLC---->clear carry
CMC---->carry make change
STD---->set direction
CLD---->clear direction
STI---->set interrupt
CLI---->clear interrupt
六、偽指令
DW---->define word
PROC---->procedure
ENDP---->end of procedure
SEGMENT---->segment
ASSUME---->assume
ENDS---->end segment(段, 節(jié),片斷)
END---->end