// #LAYOUT# STD * #TAKE // #LAYOUT# * BASIC_0 #TAKE // #LAYOUT# * * #IGNORE // LIST basic text. // XXX - Does not currently support line number ranges cmd_list: // Set current line pointer to start of memory jsr init_oldtxt 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 ply_trash_a 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. 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 // branch always list_is_pi: lda #$7E // FALLTROUGH list_is_literal: jsr JCHROUT iny bne list_print_loop list_end_of_line: // Print end of line jmp print_return