Prev: FEAB Up: Map Next: FF2A
FEFA: Load a block forwards
Used by the routines at FE45 and FE79.
FEFA EX AF,AF' Save the flags
FEFB JR NZ,$FF02 Check if this is the flag byte
FEFD LD (IX+$00),L This is data, store this byte and move on
FF00 JR $FF0C
FF02 RL C Remember the carry flag
FF04 XOR L Check the flag byte is correct
FF05 NOP The corresponding routine in the ROM would exit here - in this custom loader, the flag byte is ignored
FF06 LD A,C Restore carry flag
FF07 RRA
FF08 LD C,A
FF09 INC DE Length should not be decreased for the flag byte
FF0A JR $FF0E Move on to get next byte
FF0C INC IX Point to next byte
FF0E DEC DE Decrease length
FF0F EX AF,AF' Restore flags
FF10 LD B,$E3 Set timing constant
This entry point is used by the routine at FEAB.
FF12 LD L,$01 Clear bits in the byte to collect
FF14 CALL $FF4E Get a tape edge
FF17 RET NC Return if it took too long
FF18 LD A,$ED See how quickly an edge was found. If less than ED, a 0 was found, otherwise a 1
FF1A CP B
FF1B RL L Store the relevant bit
FF1D LD B,$E1 Set timing constant for next bit
FF1F JP NC,$FF14 Jump back while there are still bits to retrieve
FF22 LD A,H Update "parity matching" byte in H
FF23 XOR L
FF24 LD H,A
FF25 LD A,D Any more bytes to load?
FF26 OR E
FF27 JR NZ,$FEFA Loop back if there are
FF29 RET All done
Prev: FEAB Up: Map Next: FF2A