51单片机指令表
Posted NLJYBSA
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了51单片机指令表相关的知识,希望对你有一定的参考价值。
数据传输类指令 | |||||||||
指令 | 功能说明 | 指令代码 | B | T | P | OV | AC | CY | |
MOV | A,Rn | 寄存器送累加器 | E8~EF | 1 | 1 | √ | × | × | × |
MOV | A,direct | 直接寻址单元送累加器 | E5 direct | 2 | 1 | √ | × | × | × |
MOV | A,@Ri | 内部RAM单元送累加器 | E6~E7 | 1 | 1 | √ | × | × | × |
MOV | A,#data | 立即数送累加器 | 74 data | 2 | 1 | √ | × | × | × |
MOV | Rn,A | 累加器送寄存器 | F8~FF | 1 | 1 | × | × | × | × |
MOV | Rn,direct | 直接寻址单元送寄存器 | A8~AF direct | 2 | 2 | × | × | × | × |
MOV | Rn,#data | 立即数送寄存器 | 78~7F data | 2 | 1 | × | × | × | × |
MOV | direct,Rn | 寄存器送直接寻址单元 | 88~8F direct | 2 | 2 | × | × | × | × |
MOV | direct2,direct1 | 直接寻址单元送直接寻址单元 | 85 direct1 direct2 | 3 | 2 | × | × | × | × |
MOV | direct,A | 累加器送直接寻址单元 | F5 direct | 2 | 1 | × | × | × | × |
MOV | direct,@Ri | 内部RAM单元送直接寻址单元 | 86~87 direct | 2 | 2 | × | × | × | × |
MOV | direct,#data | 立即数送直接寻址单元 | 75 direct data | 3 | 2 | × | × | × | × |
MOV | @Ri,A | 累加器送内部RAM | F6~F7 | 1 | 1 | × | × | × | × |
MOV | @Ri,direct | 直接寻址单元送内部RAM单元 | A6~A7 direct | 2 | 2 | × | × | × | × |
MOV | @Ri,#data | 立即数送内部RAM单元 | 76~77 data | 2 | 1 | × | × | × | × |
MOV | DPTR,#data16 | 16 位立即数送数据指针 | 90 data15~8 data7~0 | 3 | 2 | × | × | × | × |
MOVC | A,@A+DPTR | 查表数据送累加器(DPTR为基址) | 93 | 1 | 2 | √ | × | × | × |
MOVC | A,@A+PC | 查表数据送累加器(PC为基址) | 83 | 1 | 2 | √ | × | × | × |
MOVX | A,@Ri | 外部RAM单元送累加器(8位地址) | E2~E3 | 1 | 2 | √ | × | × | × |
MOVX | A,@DPTR | 外部RAM单元送累加器(16位地址) | E0 | 1 | 2 | √ | × | × | × |
MOVX | @Ri,A | 累加器送外部RAM单元(8位地址) | F2~F3 | 1 | 2 | × | × | × | × |
MOVX | @DPTR,A | 累加器送外部RAM单元(16位地址) | F0 | 1 | 2 | × | × | × | × |
PUSH | direct | 直接寻址单元压入栈顶 | C0 direct | 2 | 2 | × | × | × | × |
POP | direct | 栈顶弹至直接寻址单元 | D0 direct | 2 | 2 | × | × | × | × |
XCH | A,Rn | 累加器和寄存器交换 | C8~CF | 1 | 1 | √ | × | × | × |
XCH | A,direct | 累加器与直接寻址单元交换 | C5 direct | 2 | 1 | √ | × | × | × |
XCH | A,@Ri | 累加器与内部RAM单元交换 | C6~C7 | 1 | 1 | √ | × | × | × |
SWAP | A | 累加器高4位与低4位交换 | C4 | 1 | 1 | × | × | × | × |
XCHD | A,@Ri | 累加器与内部RAM单元低4 位交换 | D6~D7 | 1 | 1 | √ | × | × | × |
算术运算类指令 | |||||||||
指令 | 功能说明 | 指令代码 | B | T | P | OV | AC | CY | |
INC | A | 累加器加1 | 04 | 1 | 1 | √ | × | × | × |
INC | Rn | 寄存器加1 | 08~0F | 1 | 1 | × | × | × | × |
INC | direct | 直接寻址单元加1 | 05 direct | 2 | 1 | × | × | × | × |
INC | @Ri | 内部RAM单元加1 | 06~07 | 1 | 1 | × | × | × | × |
INC | DPTR | 数据指针加1 | A3 | 1 | 2 | ||||
DEC | A | 累加器减1 | 14 | 1 | 1 | √ | × | × | × |
DEC | Rn | 寄存器减1 | 18~1F | 1 | 1 | × | × | × | × |
DEC | direct | 直接寻址单元减1 | 15 direct | 2 | 1 | × | × | × | × |
DEC | @Ri | 内部RAM单元减1 | 16~17 | 1 | 1 | × | × | × | × |
MUL | A B | 累加器A乘寄存器B | A4 | 1 | 4 | √ | √ | × | 0 |
DIV | A B | 累加器A除以寄存器B | 84 | 1 | 4 | √ | √ | × | 0 |
DA | A | 十进制调整 | D4 | 1 | 1 | √ | × | √ | √ |
ADD | A,Rn | 累加器加寄存器 | 28~2F | 1 | 1 | √ | √ | √ | √ |
ADD | A,direct | 累加器加直接寻址单元 | 25 direct | 2 | 1 | √ | √ | √ | √ |
ADD | A,@Ri | 累加器加内部RAM单元 | 26~27 | 1 | 1 | √ | √ | √ | √ |
ADD | A,#data | 累加器加立即数 | 24 data | 2 | 1 | √ | √ | √ | √ |
ADDC | A,Rn | 累加器加寄存器和进位标志 | 38~3F | 1 | 1 | √ | √ | √ | √ |
ADDC | A,direct | 累加器加直接寻址单元和进位标志 | 35 direct | 2 | 1 | √ | √ | √ | √ |
ADDC | A,@Ri | 累加器加内部RAM单元和进位标志 | 36~37 | 1 | 1 | √ | √ | √ | √ |
ADDC | A,#data | 累加器加立即数和进位标志 | 34 data | 2 | 1 | √ | √ | √ | √ |
SUBB | A,Rn | 累加器减寄存器和进位标志 | 98~9F | 1 | 1 | √ | √ | √ | √ |
SUBB | A,direct | 累加器减直接寻址单元和进位标志 | 95 direct | 2 | 1 | √ | √ | 51单片机的指令系统 |