![]() |
Routines |
| Prev: 45107 | Up: Map | Next: 45210 |
|
When the action flag is set, stores this character on the display list and allocates a record for the next one. Reached through the standard command table at Table_CommandHandlerLookup_Standard, dispatched by 45024.
|
||||
| LinkCharacterWhenFlagged | 45129 | BIT 1,E | Jump ahead to LinkCharacterWhenFlagged_0 if bit 1 is clear. | |
| 45131 | JR Z,LinkCharacterWhenFlagged_0 | |||
| 45133 | LD HL,2187 | Point HL at 2187 and store its low byte at IY+0. | ||
| 45136 | LD (IY+0),L | |||
| 45139 | LD (IY+1),H | Store H at IY+1. | ||
| 45142 | RES 1,E | Clear the link bit on this character. | ||
| LinkCharacterWhenFlagged_0 | 45144 | PUSH HL | Keep the character record. | |
| 45145 | PUSH DE | |||
| 45146 | PUSH IY | |||
| 45148 | PUSH IX | |||
| 45150 | LD IY,40940 | Use the character script entry list (CharacterScriptEntryList+1). | ||
| 45154 | LD DE,0 | Call IncrementPointerAndCompare to step pointer and compare. | ||
| 45157 | CALL IncrementPointerAndCompare | |||
| 45160 | LD A,2 | Call AllocateMemory to allocate 2 bytes. | ||
| 45162 | CALL AllocateMemory | |||
| 45165 | LD HL,(41003) | Store the low byte of the word at ActiveTextPointer as the record's flag byte. | ||
| 45168 | LD (IX+0),L | |||
| 45171 | LD (IX+1),H | Store the moved marker. | ||
| 45174 | PUSH IX | Store the low byte of the pointer in the previous record. | ||
| 45176 | POP HL | |||
| 45177 | LD (IY-2),L | |||
| 45180 | LD (IY-1),H | Store the high byte of the pointer in the previous record. | ||
| 45183 | POP IX | Restore the saved character record, the saved schedule entry, the saved source and the saved pointer from the stack. | ||
| 45185 | POP IY | |||
| 45187 | POP DE | |||
| 45188 | POP HL | |||
| LinkCharacterWhenFlagged_Loop | 45189 | CALL SaveTextPointer | Call SaveTextPointer to save the text pointer. | |
| 45192 | CP 144 | See whether the text byte is the link marker. | ||
| 45194 | JR NZ,LinkCharacterWhenFlagged_Loop | Go back to LinkCharacterWhenFlagged_Loop until the text byte is the link marker. | ||
| 45196 | LD A,B | Jump back to LinkCharacterWhenFlagged_Loop while the low nibble of B or C is not zero. | ||
| 45197 | AND 15 | |||
| 45199 | OR C | |||
| 45200 | JR NZ,LinkCharacterWhenFlagged_Loop | |||
| 45202 | LD HL,(41001) | Write 192 through the pointer at SavedTextPointer and jump back to CopyDisplayIfNeeded to copy display if needed. | ||
| 45205 | LD (HL),192 | |||
| 45207 | JP CopyDisplayIfNeeded | |||
| Prev: 45107 | Up: Map | Next: 45210 |