![]() |
Routines |
| Prev: EAAE | Up: Map | Next: EB70 |
|
Used by the routine at Sample_Tape.
Local edge-sampling helpers used by Sample_Tape. Sample_Edge waits for two edges, and Sample_Edge_Wait waits for one. Patch_Timing patches the delay operand at EB51.
|
||||||||||||||||||||
|
Wait for a second edge after the first succeeds.
|
||||||||||||||||||||
| Sample_Edge | EB4C | CALL Sample_Edge_Wait | Call Sample_Edge_Wait and return if the carry flag is reset. | |||||||||||||||||
| EB4F | RET NC | |||||||||||||||||||
|
This entry point is used by the routine at Sample_Tape.
Wait for one EAR transition. Patch_Timing patches the delay operand at EB51.
|
||||||||||||||||||||
| Sample_Edge_Wait | EB50 | LD A,$16 | Set the delay counter in A. | |||||||||||||||||
|
Burn the patched delay before sampling.
|
||||||||||||||||||||
| Sample_Edge_Delay | EB52 | DEC A | Decrease A and jump back to Sample_Edge_Delay until it is zero. | |||||||||||||||||
| EB53 | JR NZ,Sample_Edge_Delay | |||||||||||||||||||
| EB55 | AND A | Clear the carry flag. | ||||||||||||||||||
|
Poll the EAR bit until it changes.
|
||||||||||||||||||||
| Sample_Edge_Scan | EB56 | INC B | Increase B and return if it wraps to zero. | |||||||||||||||||
| EB57 | RET Z | |||||||||||||||||||
| EB58 | LD A,$FF | Read from the keyboard;
|
||||||||||||||||||
| EB5A | IN A,($FE) | |||||||||||||||||||
| EB5C | RRA | Return if BREAK is pressed. | ||||||||||||||||||
| EB5D | RET NC | |||||||||||||||||||
| EB5E | XOR C | Match the new EAR state against C. | ||||||||||||||||||
| EB5F | AND %00100000 | Keep only the EAR bit. | ||||||||||||||||||
| EB61 | JR Z,Sample_Edge_Scan | Jump back to Sample_Edge_Scan if the EAR bit is unchanged. | ||||||||||||||||||
| EB63 | LD A,C | Invert the stored EAR/border state in C. | ||||||||||||||||||
| EB64 | CPL | |||||||||||||||||||
| EB65 | LD C,A | |||||||||||||||||||
| EB66 | LD A,$00 | Clear A ready for the border update. | ||||||||||||||||||
| EB68 | AND %00000111 | Keep only the border colour bits. | ||||||||||||||||||
| EB6A | OR %00001000 | Force the MIC bit off so the border shows. | ||||||||||||||||||
| EB6C | OUT ($FE),A | Update the border from A. | ||||||||||||||||||
| EB6E | SCF | Set the carry flag. | ||||||||||||||||||
| EB6F | RET | Return. | ||||||||||||||||||
| Prev: EAAE | Up: Map | Next: EB70 |