few 6502 and some 65SC02 optimizations
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 23.11.2002
|
||||
; Christian Krueger, 11-Mar-2017, saved 5 bytes
|
||||
;
|
||||
; CC65 runtime: Convert char in ax into a long
|
||||
;
|
||||
@@ -9,16 +10,12 @@
|
||||
|
||||
; Convert A from char to long in EAX
|
||||
|
||||
along: ldx #$ff
|
||||
cmp #$80 ; Positive?
|
||||
bcs store ; no, apply $FF
|
||||
|
||||
aulong: ldx #0
|
||||
stx sreg
|
||||
store: stx sreg
|
||||
stx sreg+1
|
||||
rts
|
||||
|
||||
along: cmp #$80 ; Positive?
|
||||
bcc aulong ; Yes, handle like unsigned type
|
||||
ldx #$ff
|
||||
stx sreg
|
||||
stx sreg+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user