Routines |
Prev: FE00 | Up: Map | Next: FF24 |
|
||||
Checksum | FEF7 | LD HL,$4000 | HL=4000. | |
FEFA | LD BC,$BF24 | BC=BF24. | ||
FEFD | LD A,$00 | A=00. | ||
Checksum_Loop | FEFF | ADD A,(HL) | E=A+*HL. | |
FF00 | LD E,A | |||
FF01 | INC HL | Increment HL by one. | ||
FF02 | DEC BC | Decrease BC by one. | ||
FF03 | LD A,B | Is BC zero?.. | ||
FF04 | OR C | |||
FF05 | LD A,E | A=E. | ||
FF06 | JR NZ,Checksum_Loop | If BC is not zero, jump to Checksum_Loop. | ||
FF08 | CP (HL) | If *HL is not zero, jump to 00 (return to ZX Spectrum BASIC). | ||
FF09 | JP NZ,$0000 | |||
FF0C | LD DE,$5B80 | DE=5B80. | ||
FF0F | LD HL,$53FE | HL=53FE. | ||
Decryption_Loop | FF12 | LD A,(DE) | A=*DE. | |
FF13 | XOR (HL) | Run an XOR on *HL. | ||
FF14 | RES 4,H | Reset bit 4 of H. | ||
FF16 | XOR (HL) | Run another XOR on *HL. | ||
FF17 | SET 4,H | Set bit 4 of H. | ||
FF19 | LD (DE),A | Write A to *DE. | ||
FF1A | DEC HL | Decrease HL by one. | ||
FF1B | INC DE | Increment DE by one. | ||
FF1C | LD A,E | If E is not 9A jump to Decryption_Loop. | ||
FF1D | CP $9A | |||
FF1F | JR NZ,Decryption_Loop | |||
FF21 | JP $5B94 | Jump to 5B94. |
Prev: FE00 | Up: Map | Next: FF24 |