2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 05.10.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: Make boolean according to flags
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export boolne, booleq, boollt, boolle, boolgt, boolge
|
|
|
|
.export boolult, boolule, boolugt, booluge
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
boolne: bne ret1
|
|
|
|
ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
booleq: beq ret1
|
|
|
|
ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
boolle: beq ret1
|
|
|
|
boollt: bmi ret1
|
|
|
|
ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
boolgt: beq L0
|
|
|
|
boolge: bpl ret1
|
|
|
|
L0: ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
boolule:
|
2013-05-09 11:56:54 +00:00
|
|
|
beq ret1
|
2000-05-28 13:40:48 +00:00
|
|
|
boolult:
|
2013-05-09 11:56:54 +00:00
|
|
|
bcc ret1
|
|
|
|
ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
boolugt:
|
2013-05-09 11:56:54 +00:00
|
|
|
beq L1
|
2000-05-28 13:40:48 +00:00
|
|
|
booluge:
|
2013-05-09 11:56:54 +00:00
|
|
|
bcs ret1
|
|
|
|
L1: ldx #$00
|
|
|
|
txa
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
ret1: ldx #$00
|
|
|
|
lda #$01
|
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|