![]() |
Routines |
| Prev: 42004 | Up: Map | Next: 42078 |
|
Used by the routines at ProcessObject_Display, RecordResultRoomDisplay and ProcessCharacterAttribute.
Clear the top bit of the pointer, then scale the pointer down to the next bit
|
||||
| ShiftTextPointer | 42009 | PUSH BC | Save BC and rescale the text pointer. | |
| 42010 | RES 7,H | |||
| 42012 | SLA L | |||
| 42014 | SRL H | |||
| 42016 | RR L | Rotate the bit from H into L, finishing the shift of HL. | ||
| 42018 | LD A,32 | Print a space. | ||
| 42020 | CALL Print_Character | |||
| 42023 | LD DE,240 | Take 0240 as the unit DivideBySubtraction subtracts from HL. | ||
| 42026 | CALL DivideBySubtraction | |||
| 42029 | AND A | Jump ahead to ShiftTextPointer_PrintObjects if HL was below 0240. | ||
| 42030 | JR Z,ShiftTextPointer_PrintObjects | |||
| 42032 | LD B,A | Keep the count in B and print character 96 through Print_Character. | ||
| 42033 | LD A,96 | |||
| 42035 | CALL Print_Character | |||
| 42038 | CALL PrintHundredsTensAndUnits | Call PrintHundredsTensAndUnits to print the count, then jump ahead to PrintHyphen_Return if the remainder in HL is zero. | ||
| 42041 | LD A,L | |||
| 42042 | OR H | |||
| 42043 | JR Z,PrintHyphen_Return | |||
| 42045 | LD A,32 | Print a space. | ||
| 42047 | CALL Print_Character | |||
| ShiftTextPointer_PrintObjects | 42050 | LD DE,12 | Take 0012 as the unit for DivideBySubtraction. | |
| 42053 | CALL DivideBySubtraction | |||
| 42056 | AND A | Jump ahead to PrintLetterD if DivideBySubtraction counted no groups of 12. | ||
| 42057 | JR Z,PrintLetterD | |||
| 42059 | LD B,A | Use the count, then call PrintHundredsTensAndUnits to print it. | ||
| 42060 | CALL PrintHundredsTensAndUnits | |||
| 42063 | LD A,47 | Print '/'. | ||
| 42065 | CALL Print_Character | |||
| 42068 | LD A,L | Jump ahead to PrintHyphen if the remainder in L is zero. | ||
| 42069 | AND A | |||
| 42070 | LD B,A | |||
| 42071 | JR Z,PrintHyphen | |||
| 42073 | CALL PrintHundredsTensAndUnits | Call PrintHundredsTensAndUnits to print the units and return through PrintHyphen_Return. | ||
| 42076 | JR PrintHyphen_Return | |||
| Prev: 42004 | Up: Map | Next: 42078 |