mirror of
https://github.com/cc65/cc65.git
synced 2024-06-25 13:29:41 +00:00
Remove value test code (no longer needed)
git-svn-id: svn://svn.cc65.org/cc65/trunk@44 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
97c9226c1e
commit
01b788b1fc
|
@ -8,7 +8,7 @@
|
||||||
; called a lot!
|
; called a lot!
|
||||||
|
|
||||||
.export tosadda0, tosaddax
|
.export tosadda0, tosaddax
|
||||||
.importzp sp, tmp1
|
.importzp sp
|
||||||
|
|
||||||
tosadda0:
|
tosadda0:
|
||||||
ldx #0
|
ldx #0
|
||||||
|
@ -16,7 +16,7 @@ tosaddax:
|
||||||
ldy #0
|
ldy #0
|
||||||
clc
|
clc
|
||||||
adc (sp),y ; lo byte
|
adc (sp),y ; lo byte
|
||||||
sta tmp1 ; save it
|
pha ; save it
|
||||||
txa
|
txa
|
||||||
iny
|
iny
|
||||||
adc (sp),y ; hi byte
|
adc (sp),y ; hi byte
|
||||||
|
@ -27,21 +27,6 @@ tosaddax:
|
||||||
sta sp
|
sta sp
|
||||||
bcc L1
|
bcc L1
|
||||||
inc sp+1
|
inc sp+1
|
||||||
L1: txa ; Test high byte
|
L1: pla ; Restore low byte
|
||||||
bmi L2
|
|
||||||
bne L3
|
|
||||||
lda tmp1 ; Get low byte
|
|
||||||
rts
|
|
||||||
|
|
||||||
; Value is negative
|
|
||||||
|
|
||||||
L2: lda tmp1 ; Get low byte
|
|
||||||
ldy #$FF ; Force negative
|
|
||||||
rts
|
|
||||||
|
|
||||||
; Value is positive != 0
|
|
||||||
|
|
||||||
L3: lda tmp1 ; Get low byte
|
|
||||||
ldy #1
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user