// // 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 (EAL),y ldx #$37 stx $01 plp #else ldy #0 sta (EAL),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 (EAL),y ldx #$37 stx $01 plp // Compare with stored byte cmp TBTCNT #else ldy #0 cmp (EAL),y #endif beq lvs_handle_byte_load_verify_end sec rts #if CONFIG_IEC lvs_advance_EAL: // Advance pointer inc EAL+0 bne !+ inc EAL+1 !: rts #endif #if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO || CONFIG_IEC lvs_setup_MEMUSS: lda STAL+0 sta MEMUSS+0 lda STAL+1 sta MEMUSS+1 rts lvs_advance_MEMUSS_check_EAL: // Advance pointer inc MEMUSS+0 bne !+ inc MEMUSS+1 !: lda MEMUSS+1 cmp EAL+1 bne !+ lda MEMUSS+0 cmp EAL+0 !: rts #endif 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 #