飞思卡尔的加减指令:
ADD Add without carry to A (A)+(M)→A
例如:ADD$F3;(F3)+(A)→A。
ADC Add with carry to A (A)+(M)+C→A
SBC Subtract with borrow from A (A)一(M)一C→A
.SUB Subtract memory from A (A)一
例如:
DLC;O→C
LDA #$AB;$AB→A
SUB$%CD;(A)-$CD=$AB-$CD,借位l→C,$100+$AB=SDE→A;A=$DE,C=l
LDA #$02;$02;$02A
SBC#$01;A—C一$Ol=$02—1—1=$00,无借位,A=$00,C=0
更多精彩请您关注: