// // Helper functions for various LOAD/VERIFY/SAVE routine variants (IEC / U64 / etc.) // lvs_handle_byte_load_verify: ldy VERCKK bne lvs_handle_byte_verify // As with our BASIC, we want to enable LOADing // anywhere in memory, including over the IO space. // Thus we have to use a helper routine in low memory // to do the memory access #if CONFIG_MEMORY_MODEL_60K // Save byte under ROMs and IO if required php sei ldx #$33 stx $01 ldy #0 sta (STAL),y ldx #$37 stx $01 plp #else ldy #0 sta (STAL),y #endif // FALLTROUGH lvs_handle_byte_load_verify_end: clc rts lvs_handle_byte_verify: #if CONFIG_MEMORY_MODEL_60K // Store byte for comparing sta TBTCNT // Retrieve byte from under ROMs and IO if required php sei ldx #$33 stx $01 ldy #0 lda (STAL),y ldx #$37 stx $01 plp // Compare with stored byte cmp TBTCNT #else ldy #0 cmp (STAL),y #endif beq lvs_handle_byte_load_verify_end sec rts lvs_advance_pointer: // Advance pointer inc STAL+0 bne !+ inc STAL+1 !: rts lvs_display_searching_for: lda MSGFLG bpl lvs_display_end ldx #__MSG_KERNAL_SEARCHING_FOR jsr print_kernal_message ldy #$00 !: cpy FNLEN beq lvs_display_end #if CONFIG_MEMORY_MODEL_60K ldx #