![]() |
Routines |
| Prev: A414 | Up: Map | Next: A45E |
|
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 | A419 | PUSH BC | Save BC and rescale the text pointer. | |
| A41A | RES 7,H | |||
| A41C | SLA L | |||
| A41E | SRL H | |||
| A420 | RR L | Rotate the bit from H into L, finishing the shift of HL. | ||
| A422 | LD A,$20 | Print a space. | ||
| A424 | CALL Print_Character | |||
| A427 | LD DE,$00F0 | Take 00F0 as the unit DivideBySubtraction subtracts from HL. | ||
| A42A | CALL DivideBySubtraction | |||
| A42D | AND A | Jump ahead to ShiftTextPointer_PrintObjects if HL was below 00F0. | ||
| A42E | JR Z,ShiftTextPointer_PrintObjects | |||
| A430 | LD B,A | Keep the count in B and print character 60 through Print_Character. | ||
| A431 | LD A,$60 | |||
| A433 | CALL Print_Character | |||
| A436 | CALL PrintHundredsTensAndUnits | Call PrintHundredsTensAndUnits to print the count, then jump ahead to PrintHyphen_Return if the remainder in HL is zero. | ||
| A439 | LD A,L | |||
| A43A | OR H | |||
| A43B | JR Z,PrintHyphen_Return | |||
| A43D | LD A,$20 | Print a space. | ||
| A43F | CALL Print_Character | |||
| ShiftTextPointer_PrintObjects | A442 | LD DE,$000C | Take 000C as the unit for DivideBySubtraction. | |
| A445 | CALL DivideBySubtraction | |||
| A448 | AND A | Jump ahead to PrintLetterD if DivideBySubtraction counted no groups of 0C. | ||
| A449 | JR Z,PrintLetterD | |||
| A44B | LD B,A | Use the count, then call PrintHundredsTensAndUnits to print it. | ||
| A44C | CALL PrintHundredsTensAndUnits | |||
| A44F | LD A,$2F | Print '/'. | ||
| A451 | CALL Print_Character | |||
| A454 | LD A,L | Jump ahead to PrintHyphen if the remainder in L is zero. | ||
| A455 | AND A | |||
| A456 | LD B,A | |||
| A457 | JR Z,PrintHyphen | |||
| A459 | CALL PrintHundredsTensAndUnits | Call PrintHundredsTensAndUnits to print the units and return through PrintHyphen_Return. | ||
| A45C | JR PrintHyphen_Return | |||
| Prev: A414 | Up: Map | Next: A45E |