MCS-51單片機匯編語言:算數(shù)運算指令有哪些?
加法指令(Addtion)
ADD A, Rn ; A←(A)+(Rn)
ADD A, @Ri ;A←(A)+((Ri))
ADD A, direct ;A←(A)+(direct)
ADD A, #data ;A←(A)+#data
帶進位加法指令
ADDC A, Rn ; A←(A)+(Rn)+(Cy)
ADDC A, @Ri ;A←(A)+((Ri )) +(Cy)
ADDC A, direct ;A←(A)+(direct) +(Cy)
ADDC A, #data ;A←(A)+#data +(Cy)
加1指令
INC A ;A←(A)+1
INC Ri ;Ri←(A)+1
INC direct ;direct←(direct)+1
INC @Ri ;(Ri)←((Ri))+1
INC DPTR ;DPTR←(DPTR)+1
十進制調(diào)整指令
DA A
帶借位減法指令(Subtraction)
SUBB A, Rn ; A←(A)-(Rn)-(Cy)
SUBB A, @Ri ;A←(A)-((Ri) ) -(Cy)
SUBB A, direct ;A←(A)-(direct) -(Cy)
SUBB A, #data ;A←(A)-#data -(Cy)
減1指令(Decrease)
DEC A ;A←(A)-1
DEC Ri ;Ri←(A)-1
DEC direct ;direct←(direct)-1
DEC @Ri ;(Ri)←((Ri))-1
乘法指令(Multiplication)
MUL AB
除法指令(Division)
DIV AB