PersonalCorpus 版 (精华区)

<u style="text-underline: double">MCS-51指令功能简述表  </u>
    
╭─────────┬──────┬──────┬──────┬──────╮
│类别              │指令格式    │功能简述    │字节数      │周期        │
├─────────┼──────┼──────┼──────┼──────┤
│数据传送类指令期  │MOV A,Rn   │寄存器送累加│1           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV Rn,A    │累加器送寄存│1           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV A ,@Ri │内部RAM单元 │1           │1           │
│                  │            │送累加器    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV@Ri ,A │累加器送内部│1           │1           │
│                  │            │RAM单元     │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV A ,#data│立即数送累加│2           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV A,direct│直接寻址单元│2           │1           │
│                  │            │送累加器    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV direct,A│累加器送直接│2           │1           │
│                  │            │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV Rn,#data│立即数送寄存│2           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV direct ,│立即数送直接│3           │2           │
│                  │#data       │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV@Ri,#data│立即数送内部│2           │1           │
│                  │            │RAM单元     │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV direct,│寄存器送直接│2           │2           │
│                  │Rn          │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVRn,direct│直接寻址单元│2           │2           │
│                  │            │送寄存器    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV direct ,│内部RAM单元 │2           │2           │
│                  │@Ri        │送直接寻址单│            │            │
│                  │            │元          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV  @Ri,   │直接寻址单元│2           │2           │
│                  │direct      │送内部RAM单 │            │            │
│                  │            │元          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV direct2,│直接寻址单元│3           │2           │
│                  │direct1     │送          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOV DPTR , │16位立即数送│3           │2           │
│                  │   #data16  │数据指针    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVX A,@Ri  │外部RAM单元 │1           │2           │
│                  │            │送累加器(8位│            │            │
│                  │            │地址)       │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVX @Ri,A  │累加器送外部│1           │2           │
│                  │            │RAM单元(8位 │            │            │
│                  │            │地址)       │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVX A ,   │外部RAM单元 │1           │2           │
│                  │@DPTR       │送累加器(16 │            │            │
│                  │            │位地址)     │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVX @DPTR │累加器送外部│1           │2           │
│                  │,A         │RAM单元(16位│            │            │
│                  │            │地址)       │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVC A ,   │查表数据送累│1           │2           │
│                  │@A+DPTR     │加器(DPTR为 │            │            │
│                  │            │基址)       │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVC A,     │查表数据送累│1           │2           │
│                  │@A+PC       │加器(PC为基 │            │            │
│                  │            │址)         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XCH A ,Rn  │累加器与寄存│1           │1           │
│                  │            │器交换      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XCH A ,@Ri│累加器与内部│1           │1           │
│                  │            │RAM单元交换 │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XCHD A ,   │累加器与直接│2           │1           │
│                  │direct      │寻址单元交换│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XCHD A,@Ri │累加器与内部│1           │1           │
│                  │            │RAM单元低4位│            │            │
│                  │            │交换        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SWAP A      │累加器高4位 │1           │1           │
│                  │            │与低4位交换 │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │POP direct  │栈顶弹出指令│2           │2           │
│                  │            │直接寻址单元│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │PUSH direct │直接寻址单元│2           │2           │
│                  │            │压入栈顶    │            │            │
├─────────┼──────┼──────┼──────┼──────┤
│算术运算类指令    │ADD A, Rn  │累加器加寄存│1           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADD A, @Ri│累加器加内部│1           │1           │
│                  │            │RAM单元     │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADD A,direct│累加器加直接│2           │1           │
│                  │            │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADD A,#data │累加器加立即│2           │1           │
│                  │            │数          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADDC A, Rn │累加器加寄存│1           │1           │
│                  │            │器和进位标志│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADDC A,@Ri │累加器加内部│1           │1           │
│                  │            │RAM单元和进 │            │            │
│                  │            │位标志      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADDC A,#data│累加器加立即│2           │1           │
│                  │            │数和进位标志│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ADDC A,     │累加器加直接│2           │1           │
│                  │direct      │寻址单元和进│            │            │
│                  │            │位标志      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │INC A       │累加器加1   │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │INC Rn      │寄存器加1   │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │INC direct  │直接寻址单元│2           │1           │
│                  │            │加1         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │INC @Ri    │内部RAM单元 │1           │1           │
│                  │            │加1         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │INC DPTR    │数据指针加1 │1           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │DA A        │十进制调整  │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │SUBB A, Rn │累加器减寄存│1           │1           │
│                  │            │器和进位标志│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SUBB A,@Ri │累加器减内部│1           │1           │
│                  │            │RAM单元和进 │            │            │
│                  │            │位标志      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SUBB A,#data│累加器减立即│2           │1           │
│                  │            │数和进位标志│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SUBB A,    │累加器减直接│2           │1           │
│                  │direct      │寻址单元和进│            │            │
│                  │            │位标志      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │DEC A       │累加器减1   │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │DEC Rn      │寄存器减1   │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │DEC @Ri    │内部RAM单元 │1           │1           │
│                  │            │减1         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │DEC direct  │直接寻址单元│2           │1           │
│                  │            │减1         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MUL AB      │累加器乘寄存│1           │4           │
│                  │            │器B         │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │DIV AB      │累加器除以寄│1           │4           │
│                  │            │存器B       │            │            │
├─────────┼──────┼──────┼──────┼──────┤
│逻辑运算类指令    │ANL A, Rn  │累加器与寄存│1           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANL A,@Ri │累加器与内部│1           │1           │
│                  │ANL A,#data │RAM单元     │            │            │
│                  │            ├──────┼──────┼──────┤
│                  │            │累加器与立即│2           │1           │
│                  │            │数          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANL A,direct│累加器与直接│2           │1           │
│                  │            │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANL direct, │直接寻址单元│2           │1           │
│                  │A           │与累加器    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANL direct, │直接寻址单元│3           │1           │
│                  │#data       │与立即数    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL A,Rn   │累加器或寄存│1           │1           │
│                  │            │器          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL A,@Ri  │累加器或内部│1           │1           │
│                  │            │RAM单元     │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL A,#data │累加器或立即│2           │1           │
│                  │            │数          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL A,direct│累加器或直接│2           │1           │
│                  │            │寻址单元    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL direct, │直接寻址单元│2           │1           │
│                  │A           │或累加器    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORL direct,│直接寻址单元│3           │1           │
│                  │#data       │或立即数    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL A,Rn   │累加器异或寄│1           │1           │
│                  │            │存器        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL A,@Ri  │累加器异或内│1           │1           │
│                  │            │部RAM单元   │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL A,#data │累加器异或立│2           │1           │
│                  │            │即数        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL A,direct│累加器异或直│2           │1           │
│                  │            │接寻址单元  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL direct, │直接寻址单元│2           │1           │
│                  │A           │异或累加器  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │XRL direct, │直接寻址单元│3           │2           │
│                  │#data       │异或立即数  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │RL A        │累加器左循环│1           │1           │
│                  │            │移位        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │RLC A       │累加器连进位│1           │1           │
│                  │            │标志左循环移│            │            │
│                  │            │位          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │RR A        │累加器右循环│1           │1           │
│                  │            │移位        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │RRC A       │累加器连进位│1           │1           │
│                  │            │标志右循环移│            │            │
│                  │            │位          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CPL A       │累加器取反  │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │CLR A       │累加器清零  │1           │1           │
├─────────┼──────┼──────┼──────┼──────┤
│控制转移类指令    │ACCALL      │2KB范围内绝 │2           │2           │
│                  │addr11      │对调用      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │AJMP addr11 │2KB范围内绝 │2           │2           │
│                  │            │对转移      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │LCALLaddr16 │2KB范围内长 │3           │2           │
│                  │            │调用        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │LJMP addr16 │2KB范围内长 │3           │2           │
│                  │            │转移        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SJMP rel    │相对短转移  │2           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │JMP@A+DPTR │相对长转移  │1           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │RET         │子程序返回  │1           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │RET1        │中断返回    │1           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │JZ rel      │累加器为零转│2           │2           │
│                  │            │移          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │JNZrel      │累加器非零转│2           │2           │
│                  │            │移          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CJNE A ,#da│累加器与立即│3           │2           │
│                  │ta ,rel    │数不等转移  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CJNE A ,dir│累加器与直接│3           │2           │
│                  │ect ,rel   │寻址单元不等│            │            │
│                  │            │转移        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CJNE Rn,#da│寄存器与立即│3           │2           │
│                  │ta ,rel    │数不等转移  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CJNE @Ri ,│RAM单元与立 │3           │2           │
│                  │#data ,rel │即数不等转移│            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │DJNZ Rn ,re│寄存器减1不 │2           │2           │
│                  │l           │为零转移    │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │DJNZ direct │直接寻址单元│3           │2           │
│                  │,rel       │减1不为零转 │            │            │
│                  │            │移          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │NOP         │空操作      │1           │1           │
├─────────┼──────┼──────┼──────┼──────┤
│布尔操作类指令    │MOVC, bit  │直接寻址位送│2           │1           │
│                  │            │C           │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │MOVbit, C  │C送直接寻址 │2           │1           │
│                  │            │位          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CLRC        │C清零       │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │CLRbit      │直接寻址位清│2           │1           │
│                  │            │零          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │CPLC        │C取反       │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │CPLbit      │直接寻址位取│2           │1           │
│                  │            │反          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │SETB C      │C置位       │1           │1           │
│                  ├──────┼──────┼──────┼──────┤
│                  │SETB bit    │直接寻址位置│2           │1           │
│                  │            │位          │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANLC, bit  │C逻辑与直接 │2           │2           │
│                  │            │寻址位      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ANLC, /bit │C逻辑与直接 │2           │2           │
│                  │            │寻址位的反  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORLC, bit  │C逻辑或直接 │2           │2           │
│                  │            │寻址位      │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │ORLC, /bit │C逻辑或直接 │2           │2           │
│                  │            │寻址位的反  │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │JC rel      │C为1转移    │2           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │JNCrel      │C为零转移   │2           │2           │
│                  ├──────┼──────┼──────┼──────┤
│                  │JB bit,rel │直接寻址位为│3           │2           │
│                  │            │1转移       │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │JNBbit,rel │直接寻址为0 │3           │2           │
│                  │            │转移        │            │            │
│                  ├──────┼──────┼──────┼──────┤
│                  │JBCbit,rel │直接寻址位为│3           │2           │
│                  │            │1转移并清该 │            │            │
│                  │            │位          │            │            │
╰─────────┴──────┴──────┴──────┴──────╯

















;
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.238.72]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:632.114毫秒