make LIST command honour REM and quotes.
This commit is contained in:
1 parent
bc5e3cdbb9
commit
67ac641741
1 file changed
+15
@@ -49,6 +49,10 @@ list_print_loop:
|
|||||||
lda #$22
|
lda #$22
|
||||||
jmp list_is_literal
|
jmp list_is_literal
|
||||||
list_not_quote:
|
list_not_quote:
|
||||||
|
;; Check quote mode, and display as literal if required
|
||||||
|
ldx quote_mode_flag
|
||||||
|
bne list_is_literal
|
||||||
|
|
||||||
cmp #$7f
|
cmp #$7f
|
||||||
bcc list_is_literal
|
bcc list_is_literal
|
||||||
|
|
||||||
@@ -56,6 +60,7 @@ list_not_quote:
|
|||||||
|
|
||||||
;; Save registers
|
;; Save registers
|
||||||
tax
|
tax
|
||||||
|
pha
|
||||||
tya
|
tya
|
||||||
pha
|
pha
|
||||||
|
|
||||||
@@ -77,6 +82,16 @@ list_not_quote:
|
|||||||
|
|
||||||
pla
|
pla
|
||||||
tay
|
tay
|
||||||
|
pla
|
||||||
|
|
||||||
|
cmp #$8f
|
||||||
|
bne list_not_rem
|
||||||
|
;; REM command locks quote flag on until the end of the line, allowing
|
||||||
|
;; funny characters in REM statements without problem.
|
||||||
|
inc $0427
|
||||||
|
sta quote_mode_flag ; Any value other than $00 or $FF will lock quote mode on, so the token value of REM is fine here
|
||||||
|
;; FALL THROUGH
|
||||||
|
list_not_rem:
|
||||||
|
|
||||||
iny
|
iny
|
||||||
bne list_print_loop
|
bne list_print_loop
|
||||||
|
|||||||
Reference in new issue
Block a user