mirror of
https://github.com/marketideas/qasm.git
synced 2025-08-10 13:24:59 +00:00
allow comma in quoted string during address check
example: pea ',' or pea #',' previously generated a bad address mode error. The addmode function expected an X,Y, or S after the , which is how it generated the error. Changed to skip , search within the quoted string. test case: * previously caused an error pea #',' pea ',' pea #"," pea "," pea ','+',' * still cause and error (as they should): pea ',',y pea #',',y * unterminated string: pea '
This commit is contained in:
@@ -2412,6 +2412,10 @@ addmode php
|
|||||||
beq :force16
|
beq :force16
|
||||||
cmp #'>'
|
cmp #'>'
|
||||||
beq :force24
|
beq :force24
|
||||||
|
cmp #$27 ; '
|
||||||
|
beq :skipq
|
||||||
|
cmp #$22 ; "
|
||||||
|
beq :skipq
|
||||||
jmp :index
|
jmp :index
|
||||||
:force8 lda #amforce8
|
:force8 lda #amforce8
|
||||||
tsb myvalue
|
tsb myvalue
|
||||||
@@ -2427,6 +2431,17 @@ addmode php
|
|||||||
jmp :index
|
jmp :index
|
||||||
:square lda #amsquare
|
:square lda #amsquare
|
||||||
tsb myvalue
|
tsb myvalue
|
||||||
|
jmp :index
|
||||||
|
|
||||||
|
* skip over quoted operand component.
|
||||||
|
:skipq sta :q
|
||||||
|
:skipq1 iny
|
||||||
|
lda [lineptr],y
|
||||||
|
cmp #' '
|
||||||
|
blt :badmode
|
||||||
|
cmp :q
|
||||||
|
bne :skipq1
|
||||||
|
|
||||||
:index iny
|
:index iny
|
||||||
lda [lineptr],y
|
lda [lineptr],y
|
||||||
cmp #' '+1
|
cmp #' '+1
|
||||||
@@ -2434,7 +2449,13 @@ addmode php
|
|||||||
cmp #';'
|
cmp #';'
|
||||||
beq :modexit
|
beq :modexit
|
||||||
cmp #','
|
cmp #','
|
||||||
bne :index
|
beq :index1
|
||||||
|
cmp #$27 ; '
|
||||||
|
beq :skipq
|
||||||
|
cmp #$22 ; "
|
||||||
|
beq :skipq
|
||||||
|
bra :index
|
||||||
|
|
||||||
:index1 iny
|
:index1 iny
|
||||||
lda [lineptr],y
|
lda [lineptr],y
|
||||||
and #$5f
|
and #$5f
|
||||||
@@ -2542,6 +2563,7 @@ addmode php
|
|||||||
plp
|
plp
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
:q ds 2
|
||||||
|
|
||||||
addmodetbl dfb 6*3
|
addmodetbl dfb 6*3
|
||||||
dfb 7*3
|
dfb 7*3
|
||||||
|
Reference in New Issue
Block a user