mirror of
https://github.com/cc65/cc65.git
synced 2024-08-28 18:29:20 +00:00
which included commits to RCS files with non-trunk default branches. git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
32 lines
379 B
ArmAsm
32 lines
379 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 05.08.1998
|
|
;
|
|
; CC65 runtime: sub ints
|
|
;
|
|
|
|
.export tossuba0, tossubax
|
|
.import addysp1
|
|
.importzp sp, ptr1
|
|
|
|
;
|
|
; AX = TOS - AX
|
|
;
|
|
|
|
tossuba0:
|
|
ldx #0
|
|
tossubax:
|
|
ldy #0
|
|
sta ptr1
|
|
stx ptr1+1
|
|
lda (sp),y ; lo byte
|
|
sec
|
|
sbc ptr1
|
|
sta ptr1 ; save lo byte
|
|
iny
|
|
lda (sp),y
|
|
sbc ptr1+1
|
|
tax
|
|
lda ptr1
|
|
jmp addysp1 ; drop TOS, set condition codes
|
|
|