Technician Ted | Routines |
Prev: 82D4 | Up: Map | Next: 8375 |
Used by the routine at 8000.
|
||||||||||||||
8341 | EXX | Store registers | ||||||||||||
8342 | LD DE,$806B | Point DE to the animation queue | ||||||||||||
8345 | LD HL,$8029 | Point HL to the animation data | ||||||||||||
8348 | LD B,$05 | Initialise timing constant | ||||||||||||
834A | CALL $8351 | Read an edge into the alternate registers | ||||||||||||
834D | RET NC | Bail out if error | ||||||||||||
834E | EXX | Restore registers | ||||||||||||
834F | LD B,$06 | Number of bytes for each character | ||||||||||||
8351 | LD A,(HL) | Reduce current hash value | ||||||||||||
8352 | SUB C | |||||||||||||
8353 | LD (HL),A | |||||||||||||
8354 | LD A,L | Did the hash value overflow? | ||||||||||||
8355 | JR C,$835A | Move on if it did | ||||||||||||
8357 | NOP | |||||||||||||
8358 | JR $835C | Move on to next value | ||||||||||||
835A | LD (DE),A | Set next animation character to queue | ||||||||||||
835B | INC E | Move onto the next | ||||||||||||
835C | ADD A,$06 | Point to the next sprite data | ||||||||||||
835E | LD L,A | |||||||||||||
835F | DJNZ $8351 | |||||||||||||
8361 | EXX | Restore registers | ||||||||||||
Sample a bit from the EAR port. This routine is similar to the LD_SAMPLE routine at 05ED in the ROM. This entry point is used by the routine at 82D4.
|
||||||||||||||
8362 | AND A | Test edges are still found or pending | ||||||||||||
8363 | INC B | Increase number of attemps to find edges | ||||||||||||
8364 | RET Z | Return if it's taken too long | ||||||||||||
8365 | LD A,$7F | Get the EAR bit and SPACE - B section of the keyboard | ||||||||||||
8367 | IN A,($FE) | |||||||||||||
8369 | RRA | |||||||||||||
836A | RET NC | Bail out if BREAK was pressed | ||||||||||||
836B | XOR C | Test the EAR bit against the expected edge state | ||||||||||||
836C | AND $20 | |||||||||||||
836E | JR Z,$8363 | Loop back if it has not changed | ||||||||||||
8370 | LD A,C | Set last edge type | ||||||||||||
8371 | CPL | |||||||||||||
8372 | LD C,A | |||||||||||||
8373 | SCF | Signal okay | ||||||||||||
8374 | RET |
Prev: 82D4 | Up: Map | Next: 8375 |