Routines |
Prev: CC55 | Up: Map | Next: CCC3 |
|
||||
FIREON | CC56 | LD HL,(D_ADD) | copy D_ADD variable into TEMADD | |
CC59 | LD (TEMADD),HL | |||
CC5C | LD A,$3C | set unknown64 variable to $3C and call routine56 ?? | ||
CC5E | LD (unknown64),A | |||
CC61 | CALL routine56 | |||
CC64 | LD A,$20 | set unknown64 variable to $20 ?? space character? | ||
CC66 | LD (unknown64),A | |||
CC69 | LD HL,(X_ADD) | copy X_ADD variable into D_ADD | ||
CC6C | LD (D_ADD),HL | |||
CC6F | LD HL,map_object_table | set object_table_entry_pointer pointer to point at first entry in map_object_table | ||
CC72 | LD (object_table_entry_pointer),HL | |||
CC75 | LD A,$09 | set SRTCNT variable to $09 | ||
CC77 | LD (SRTCNT),A | |||
CC7A | LD B,$9E | set B register to $9E as loop counter | ||
FIREON_loop | CC7C | PUSH BC | preserve loop counter | |
CC7D | CALL routine52 | call routine52 ??? | ||
CC80 | OR A | if byte returned in A equals zero then jump forwards to LCC9E | ||
CC81 | JR Z,LCC9E | |||
CC83 | LD HL,(BUFPNT) | copy byte from the address in BUFPNT to object_table_entry_pointer variable | ||
CC86 | LD (HL),A | |||
CC87 | LD HL,(object_table_entry_pointer) | |||
CC8A | AND A | ensure carry flag is clear | ||
CC8B | LD DE,map_object_table | subtract map_object_table from address in BUFPNT to get offset | ||
CC8E | SBC HL,DE | |||
CC90 | LD A,L | increment address in BUFPNT and store offset at resulting address | ||
CC91 | LD HL,(BUFPNT) | |||
CC94 | INC HL | |||
CC95 | LD (HL),A | |||
CC96 | INC HL | increment address again and store result back in BUFPNT | ||
CC97 | LD (BUFPNT),HL | |||
CC9A | LD HL,SRTCNT | increment SRTCNT variable | ||
CC9D | INC (HL) | |||
LCC9E | CC9E | LD HL,(object_table_entry_pointer) | increment object_table_entry_pointer pointer | |
CCA1 | INC HL | |||
CCA2 | LD (object_table_entry_pointer),HL | |||
CCA5 | POP BC | restore loop counter | ||
CCA6 | DJNZ FIREON_loop | execute loop 158 times | ||
CCA8 | LD HL,INBUF | call SORT with INBUF in HL and SRTCNT in A ?? | ||
CCAB | LD A,(SRTCNT) | |||
CCAE | CALL SORT | |||
CCB1 | LD HL,$D3F3 | set BUFPNT to second byte of INBUF | ||
CCB4 | LD (BUFPNT),HL | |||
CCB7 | LD HL,(TEMADD) | copy TEMADD to D_ADD | ||
CCBA | LD (D_ADD),HL | |||
CCBD | LD A,$00 | set unknown64 to zero and return | ||
CCBF | LD (unknown64),A | |||
CCC2 | RET |
Prev: CC55 | Up: Map | Next: CCC3 |