ack/mach/6500/libem/sbi.s

27 lines
474 B
ArmAsm
Raw Permalink Normal View History

1984-12-17 11:03:13 +00:00
.define Sbi2
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 subtracts two twobyte signed integers
! and returnes the result in registerpair AX.
Sbi2:
stx ARTH ! save second operand (lowbyte)
sta ARTH+1 ! save second operand (highbyte)
jsr Pop
pha
sec
txa ! get first operand (lowbyte)
sbc ARTH ! subtract second operand (lowbyte)
tax
iny
pla ! get first operand (highbyte)
sbc ARTH+1 ! subtract second operand (highbyte)
rts