; Long int compare function - used by the compare operators
;
- .export lcmp
+ .export toslcmp
.import incsp4
.importzp sp, sreg, ptr1
-lcmp: sta ptr1
+toslcmp:
+ sta ptr1
stx ptr1+1 ; EAX now in sreg:ptr1
ldy #$03
plp ; Restore flags
rts
-
+
;
.export toseqeax
- .import lcmp, booleq
+ .import toslcmp, booleq
-toseqeax:
- jsr lcmp ; Set flags
+toseqeax:
+ jsr toslcmp ; Set flags
jmp booleq ; Convert to boolean
-
+
;
.export tosgeeax
- .import lcmp, boolge
+ .import toslcmp, boolge
tosgeeax:
- jsr lcmp ; Set the flags
+ jsr toslcmp ; Set the flags
jmp boolge ; Convert to boolean
;
.export tosgteax
- .import lcmp, boolgt
+ .import toslcmp, boolgt
tosgteax:
- jsr lcmp ; Set the flags
+ jsr toslcmp ; Set the flags
jmp boolgt ; Convert to boolean
;
.export tosleeax
- .import lcmp, boolle
+ .import toslcmp, boolle
tosleeax:
- jsr lcmp ; Set the flags
+ jsr toslcmp ; Set the flags
jmp boolle ; Convert to boolean
;
.export toslteax
- .import lcmp, boollt
+ .import toslcmp, boollt
toslteax:
- jsr lcmp ; Set the flags
+ jsr toslcmp ; Set the flags
jmp boollt ; Convert to boolean
;
.export tosneeax
- .import lcmp, boolne
+ .import toslcmp, boolne
tosneeax:
- jsr lcmp ; Set flags
+ jsr toslcmp ; Set flags
jmp boolne ; Convert to boolean
;
.export tosugeeax
- .import lcmp, booluge
+ .import toslcmp, booluge
-tosugeeax:
- jsr lcmp ; Set the flags
+tosugeeax:
+ jsr toslcmp ; Set the flags
jmp booluge ; Convert to boolean
;
.export tosugteax
- .import lcmp, boolugt
+ .import toslcmp, boolugt
-tosugteax:
- jsr lcmp ; Set the flags
+tosugteax:
+ jsr toslcmp ; Set the flags
jmp boolugt ; Convert to boolean
;
.export tosuleeax
- .import lcmp, boolule
+ .import toslcmp, boolule
tosuleeax:
- jsr lcmp ; Set the flags
+ jsr toslcmp ; Set the flags
jmp boolule ; Convert to boolean
;
.export tosulteax
- .import lcmp, boolult
+ .import toslcmp, boolult
-tosulteax:
- jsr lcmp ; Set the flags
+tosulteax:
+ jsr toslcmp ; Set the flags
jmp boolult ; Convert to boolean
; CC65 runtime: Push value in a onto the stack
;
- .export pushaysp, pusha
+ .export pusha0sp, pushaysp, pusha
.importzp sp
; Beware: The optimizer knows about this function!
+pusha0sp:
+ ldy #$00
pushaysp:
lda (sp),y
pusha: ldy sp