一般来说,51系列都是8位机,只能处理8位数据
1.
CLR C ;减法只前要清空进位位,
MOV A,#7FH
SUBB A,#2BH
MOV 31H,A ;存结果高字节
MOV A,#4DH
SUBB A,#4EH
MOV 30H,A ;存结果低字节
2.
MOV A,#20H
MOV B,#21H
MUL AB
MOV R3,A
MOV R2,B
CLR C
MOV 40H,7FH
MOV 41H,4DH
MOV 42H,2BH
MOV 43H,4EH
MOV A,41H
SUBB A,43H
MOV 30H,A
MOV A,40H
SUBB A,42H
MOV 31H,A
减法只前要清空进位位,
你的做法一个单元可以存储16位数,通常的好相只能存储8位,所以需要将7F4DH存储在两个单元里,2B4EH也一样
第二题
MOV A,20H
MOV B,21H
MUL AB
MOV R3,A
MOV R2,B