Prev: 5F38 Up: Map Next: 5FA8
5F93: Hash memory with "safe" instructions
This is another memory routine which hashes 8000 - 8CA0 with instructions that do nothing except copy register values around. This means that when the loading system finishes and steps into 83C3, it will execute this code until it finds the game decrypter at 8C1C.
5F93 LD HL,$8000 Start of block
5F96 LD BC,$0CA0 Length
5F99 CALL $5F29 Return the next hash byte
5F9C AND $BF Clear bit 6 and set bit 7. This restricts the instructions to the range 80-BF, which have no jumps and write to no memory
5F9E OR $80
5FA0 LD (HL),A Set this
5FA1 INC HL Next address
5FA2 DEC BC Are we done yet?
5FA3 LD A,B
5FA4 OR C
5FA5 JR NZ,$5F99 No, do the next location
5FA7 RET
Prev: 5F38 Up: Map Next: 5FA8