ack/mach/6500/libem/ngi.s

20 lines
286 B
ArmAsm
Raw Normal View History

1984-12-17 11:03:13 +00:00
.define Ngi2
! This subroutine negates the integer in registerpair AX.
! The negation is a one's complement plus one.
Ngi2:
eor #0FFh ! one's complement A
tay
txa
eor #0FFh ! one's complement X
tax
inx ! increment X
bne 1f
iny ! increment A if neccesairy
1: tya
rts