small operator handling tweak

This commit is contained in:
FeralChild64 committed 2020-06-07 15:04:31 +02:00
1 parent 831bc8f453
commit 8aa3aed586
3 files changed
+28 -29

No files matched your search

+3 -3
View File
@@ -206,14 +206,14 @@ FRMEVL_push_operator_address:
// XXX add support for other operators, use .Y
lda operator_jumptable_hi - 1, y
lda operator_jumptable_hi, y
pha
lda operator_jumptable_lo - 1, y
lda operator_jumptable_lo, y
pha
// Push operator priority
lda operator_priorities - 1, y
lda operator_priorities, y
pha
// Continue
+10 -11
View File
@@ -18,19 +18,18 @@ fetch_operator: // XXX change the operator code to start from 0
// Check if within range
sec
sbc #$A9
sbc #$AA
bcc fetch_operator_failed // branch if below 0
beq fetch_operator_failed // branch 0
cmp #$0B
bcs fetch_operator_failed // branch if $0B or greater
cmp #$0A
bcs fetch_operator_failed // branch if $0A or greater
// Now we have to recognize '>=', '<=' and '<>' operators
cmp #$08
cmp #$07
beq fetch_operator_try_gteq
cmp #$0A
cmp #$09
beq fetch_operator_try_lteq_neq
// FALLTROUGH
@@ -57,12 +56,12 @@ fetch_operator_try_gteq:
// This is a '>'
jsr unconsume_character
lda #$08
lda #$07
bne fetch_operator_success // branch always
!:
// This is a '>='
lda #$0B
lda #$0A
bne fetch_operator_success // branch always
@@ -79,15 +78,15 @@ fetch_operator_try_lteq_neq:
// This is a '<'
jsr unconsume_character
lda #$0A
lda #$09
bne fetch_operator_success // branch always
!:
// This is a '<='
lda #$0C
lda #$0B
bne fetch_operator_success // branch always
!:
// This is a '<>'
lda #$0D
lda #$0C
bne fetch_operator_success // branch always