51单片机指令(中英对照)

整理了一下51单片机的指令,有的时候感觉这些指令集还是看英文文档比较好,毕竟指令源于英语。大致整理了一下,做的不好大家别介意。

标准51指令

数据传送类指令

MOVmove传送
MOVCmove code访问常数表(查表指令)
MOVXmove extemel RAM访问外部RAM
PUSHpush xx onto stack堆栈压入
POPpop xx from stack出栈操作
XCHexchange与ACC字节数据交换
XCHDexchange lowerder digit间址操作数低半字节与ACC低半字节内容互换
SWAPswap nibbles within the Accumulator累加器高低四位互换

算数运算类指令

ADDadd不带进位加法
ADDCadd xxx to Accumulator带进位加法
SUBBsubtract xx from ACC with CARRY带借位减法
DAdecimal adjust十进制调整
MULmultiply乘法
DIVdivide除法
DECdecrement减一操作
INCincrement加一操作

逻辑运算与循环类指令

ANLand xx to Accumulator逻辑与
ORLor xx to Accumulator逻辑或
XRLexclusive-or xx to Accumulator逻辑异或
CLRclear清零
CPLcomplement取反
RRrotate Accumulator right循环右移
RRCrotate Accumulator right through the CARRY带进位符循环右移
RLrotate Accumulator left循环左移
RLCrotate Accumulatorleft through the CARRY带进位符循环左移

控制转移类指令

AJMPabsolute jump短跳转(范围不超过2k)
LJMPlong jump长跳转(64K范围)
SJMPshort jump相对跳转(-128~127字节)
JMPjump indirect relative to the DPTR散转移
JZjump if Accumulator is zero判断0转移
JNZjump if Accumulator is notzero判断非0转移
CJNEcompare xx to ACC and jump if not equal比较不相等转移
DJNEdecrement direct byte and jump if not zero减一不为0转移
ACALLabsolute subroutine call

绝对调用(范围不超过2k)

LCALLlongsubroutine call长调用(64k范围)
RETreturn fromsubroutine 返回下一条指令处
RETIreturn form interrupt返回自中断至下一条指令处
NOPno operation空操作

位判断操作指令

JCjump if carry is set判断CY为1时,跳转
JNCjump if carry not set判断CY为0时,跳转
JBjump if direct Bit is set判断某位BIT为1时,跳转
JBCjump if direct Bit is set & clear判断某位BIT为1时,跳转并定位清0
JNBjump if direct Bit is not set判断某位BIT为0时,跳转

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值