Prev: CE22 Up: Map Next: CE60
CE4E: Clear all 56 object records
Used by the routine at GAME_ENDED.
1792 bytes from OBJECTS, the robot's records included: used when a game has ended (GAME_ENDED). The entry point CLR_MEM clears BC bytes from HL, and CLR_BYTE fills them with E; the start of a game clears the variables and records with CLR_MEM (START, AFTER_GAME). As Knight Lore's clr_mem and clr_byte.
Input
HL (CLR_MEM, CLR_BYTE) the first byte
BC (CLR_MEM, CLR_BYTE) how many
E (CLR_BYTE) the value
CLEAR_OBJECTS CE4E LD HL,OBJECTS All the records
CE51 LD BC,$0700
CE54 JR CLR_MEM
This entry point is used by the routines at START, AFTER_GAME and CLR_BITMAP_MEMORY.
CLR_MEM CE56 LD E,$00 Zero
This entry point is used by the routines at CLR_ATTRIBUTE_MEMORY and CLEAR_SCRN_BUFFER.
CLR_BYTE CE58 LD (HL),E One at a time: BC is a 16-bit count
CE59 INC HL
CE5A DEC BC
CE5B LD A,B
CE5C OR C
CE5D JR NZ,CLR_BYTE
CE5F RET
Prev: CE22 Up: Map Next: CE60