// #LAYOUT# STD * #TAKE // #LAYOUT# M65 * #TAKE // #LAYOUT# X16 BASIC_0 #TAKE // #LAYOUT# * * #IGNORE list_single_line: #if (ROM_LAYOUT_M65 && SEGMENT_BASIC_0) jsr map_BASIC_1 jsr_ind VB1__list_single_line jmp map_NORMAL #else // Print line number ldy #3 #if ROM_LAYOUT_M65 jsr peek_via_OLDTXT #elif CONFIG_MEMORY_MODEL_60K jsr peek_under_roms #else lda (OLDTXT),y #endif pha dey #if ROM_LAYOUT_M65 jsr peek_via_OLDTXT #elif CONFIG_MEMORY_MODEL_60K jsr peek_under_roms #else lda (OLDTXT),y #endif tax pla jsr print_integer jsr print_space // Iterate through printing out the line // contents lda #0 sta QTSW ldy #4 list_print_loop: #if ROM_LAYOUT_M65 jsr peek_via_OLDTXT #elif 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 #endif // ROM layout