ack/mach/6500/libem/ngi.s

25 lines
346 B
ArmAsm
Raw Permalink Normal View History

1984-12-17 11:03:13 +00:00
.define Ngi2
1987-01-30 18:41:42 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1984-12-17 11:03:13 +00:00
! This subroutine negates the integer in registerpair AX.
! The negation is a one's complement plus one.
Ngi2:
1988-08-19 17:05:03 +00:00
eor #0x0FF ! one's complement A
1984-12-17 11:03:13 +00:00
tay
txa
1988-08-19 17:05:03 +00:00
eor #0x0FF ! one's complement X
1984-12-17 11:03:13 +00:00
tax
inx ! increment X
bne 1f
iny ! increment A if neccesairy
1: tya
rts