// LIST basic text. // XXX - Doesn't currently support line number ranges cmd_list: // Set current line pointer to start of memory lda TXTTAB+0 sta OLDTXT+0 lda TXTTAB+1 sta OLDTXT+1 list_loop: ldy #1 #if CONFIG_MEMORY_MODEL_60K ldx #packed_keywords sta FRESPC+1 // Subtract $80 from token to get offset in word // list txa and #$7f tax // Now ask for it to be printed ldy #$ff jsr packed_word_search pla 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 QTSW // 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 bne list_print_loop list_is_literal: jsr JCHROUT iny bne list_print_loop list_end_of_line: // Print end of line jmp print_return