// LIST basic text. // XXX - Doesn't currently support line number ranges cmd_list: // Set current line pointer to start of memory lda basic_start_of_text_ptr+0 sta basic_current_line_ptr+0 lda basic_start_of_text_ptr+1 sta basic_current_line_ptr+1 list_loop: ldy #1 #if CONFIG_MEMORY_MODEL_60K ldx #packed_keywords sta temp_string_ptr+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: // Clear reverse flag lda #$92 jsr JCHROUT // Print end of line lda #$0d jsr JCHROUT rts