![]() |
Routines |
| Prev: 44359 | Up: Map | Next: 44440 |
|
Used by the routines at Reset_Text_Position, Initialise_Room_Display, MainMenu and Print_ControlsMenu.
Print a menu printer stream from BC. Fragment headers are three bytes (address low/high, attribute); & (38) starts a new fragment; ] (93) ends the stream. Uses the character set at Pointer_CurrentCharacterSet.
|
||||
|
Entry: pop the CALL return address into BC as the printer-stream pointer.
|
||||
| Print_Menu_Strings | 44399 | POP BC | Pop the stream pointer into BC. | |
|
Read the next menu-string fragment header: screen address and attribute into CurrentTextAttribute.
|
||||
| Print_Menu_Strings_FetchByte | 44400 | LD A,(BC) | Fetch a byte through the pointer in BC. | |
| 44401 | LD L,A | Keep the screen-address low byte in L. | ||
| 44402 | INC BC | Advance the stream pointer in BC by one. | ||
| 44403 | LD A,(BC) | Fetch a byte through the pointer in BC. | ||
| 44404 | LD H,A | Keep the screen-address high byte in H. | ||
| 44405 | INC BC | Advance the counter/pointer in BC by one. | ||
| 44406 | LD A,(BC) | Fetch a byte through the pointer in BC. | ||
| 44407 | LD (29447),A | Set the temporary room/state byte (CurrentTextAttribute). | ||
| 44410 | INC BC | Advance the counter/pointer in BC by one. | ||
| 44411 | LD D,0 | Clear D (high byte of a pointer/offset). | ||
|
Fetch the next glyph: 38 starts a new fragment, 93 ends the stream, else print it.
|
||||
| Print_Menu_Strings_FetchGlyph | 44413 | LD A,(BC) | Fetch a byte through the pointer in BC. | |
| 44414 | INC BC | Advance the counter/pointer in BC by one. | ||
| 44415 | CP 38 | Is A equal to 38? If so, jump to Print_Menu_Strings_FetchByte. | ||
| 44417 | JR Z,Print_Menu_Strings_FetchByte | |||
| 44419 | CP 93 | Is A equal to 93? If not, jump to Print_Menu_Strings_PrintGlyph. | ||
| 44421 | JR NZ,Print_Menu_Strings_PrintGlyph | |||
| 44423 | PUSH BC | Stash BC on the stack. | ||
| 44424 | RET | Return. | ||
|
Print one menu glyph and loop for the next, then clear the display buffers on the fall-through path.
|
||||
| Print_Menu_Strings_PrintGlyph | 44425 | LD E,A | Keep the glyph code in E for Print_Character. | |
| 44426 | CALL Print_Character | Call Print_Character to print Character. | ||
| 44429 | INC HL | Advance the current pointer by one byte. | ||
| 44430 | JR Print_Menu_Strings_FetchGlyph | Jump to Print_Menu_Strings_FetchGlyph to print the next menu glyph. | ||
| 44432 | CALL Clear_BothDisplayBuffers | Call Clear_BothDisplayBuffers to clear both display buffers. | ||
| 44435 | LD A,18 | Load A with 18. | ||
| 44437 | CALL Clear_AttributeFile | Call Clear_AttributeFile to clear Attribute File. | ||
| Prev: 44359 | Up: Map | Next: 44440 |