Basic Arithmetic
A=-B
A simple one, we want to set A to be -B.
The logical way is to load A with B then negate it:
78LDA,BSet A to B
ED44NEGNegate A to get A=-B
But a quicker and shorter way is:
AFXORAA=0
90SUBBA=0-B = -B
This the multi-page printable view of this section.Click here to print.
A simple one, we want to set A to be -B.
The logical way is to load A with B then negate it:
But a quicker and shorter way is: