fix for PI tooken not displayed correctly by LIST
This commit is contained in:
1 parent
99583f19c5
commit
66f719af73
1 file changed
+23
-7
+23
-7
@@ -4,10 +4,7 @@
|
|||||||
cmd_list:
|
cmd_list:
|
||||||
|
|
||||||
// Set current line pointer to start of memory
|
// Set current line pointer to start of memory
|
||||||
lda TXTTAB+0
|
jsr init_oldtxt
|
||||||
sta OLDTXT+0
|
|
||||||
lda TXTTAB+1
|
|
||||||
sta OLDTXT+1
|
|
||||||
|
|
||||||
list_loop:
|
list_loop:
|
||||||
|
|
||||||
@@ -82,25 +79,34 @@ list_print_loop:
|
|||||||
cmp #$22
|
cmp #$22
|
||||||
bne list_not_quote
|
bne list_not_quote
|
||||||
lda QTSW
|
lda QTSW
|
||||||
eor #$ff
|
eor #$FF
|
||||||
sta QTSW
|
sta QTSW
|
||||||
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
|
// Check quote mode, and display as literal if required
|
||||||
ldx QTSW
|
ldx QTSW
|
||||||
bne list_is_literal
|
bne list_is_literal
|
||||||
|
|
||||||
cmp #$7f
|
cmp #$FF
|
||||||
|
beq list_is_pi
|
||||||
|
|
||||||
|
cmp #$7F
|
||||||
bcc list_is_literal
|
bcc list_is_literal
|
||||||
|
|
||||||
// Display a token
|
// Display a token
|
||||||
|
|
||||||
// Save registers
|
// Save registers
|
||||||
|
#if CONFIG_CPU_MOS_6502
|
||||||
tax
|
tax
|
||||||
pha
|
pha
|
||||||
tya
|
tya
|
||||||
pha
|
pha
|
||||||
|
#else
|
||||||
|
phx
|
||||||
|
phy
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get pointer to compressed keyword list
|
// Get pointer to compressed keyword list
|
||||||
lda #<packed_keywords
|
lda #<packed_keywords
|
||||||
@@ -118,8 +124,13 @@ list_not_quote:
|
|||||||
ldy #$ff
|
ldy #$ff
|
||||||
jsr packed_word_search
|
jsr packed_word_search
|
||||||
|
|
||||||
|
#if CONFIG_CPU_MOS_6502
|
||||||
pla
|
pla
|
||||||
tay
|
tay
|
||||||
|
#else
|
||||||
|
ply
|
||||||
|
#endif
|
||||||
|
|
||||||
pla
|
pla
|
||||||
|
|
||||||
cmp #$8f
|
cmp #$8f
|
||||||
@@ -132,7 +143,12 @@ list_not_quote:
|
|||||||
list_not_rem:
|
list_not_rem:
|
||||||
|
|
||||||
iny
|
iny
|
||||||
bne list_print_loop
|
bne list_print_loop // branch always
|
||||||
|
|
||||||
|
list_is_pi:
|
||||||
|
lda #$7E
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
list_is_literal:
|
list_is_literal:
|
||||||
jsr JCHROUT
|
jsr JCHROUT
|
||||||
|
|||||||
Reference in new issue
Block a user