![]() |
Routines |
| Prev: 53387 | Up: Map | Next: 53478 |
|
Used by the routine at RenderHUD.
Prints the current wave number at pixel position X=*WaveDisplay_X_PixelPosition, Y=187 using the print dispatch system at PrintDispatch. The wave number is stored in packed BCD at WaveNumber: the high nibble holds the tens digit and the low nibble holds the units digit; each is OR'd with 48 to convert it to an ASCII decimal character before dispatch. Font 0 is selected for rendering and font 1 is restored on return.
|
||||
| PrintWaveNumber | 53415 | LD A,26 | Call PrintDispatch with 26 (Select Font control code). | |
| 53417 | CALL PrintDispatch | |||
| 53420 | LD A,0 | Call PrintDispatch with 0 (font 0). | ||
| 53422 | CALL PrintDispatch | |||
| 53425 | LD A,22 | Call PrintDispatch with 22 (PRINT AT control code). | ||
| 53427 | CALL PrintDispatch | |||
| 53430 | LD A,(50205) | A=*WaveDisplay_X_PixelPosition (X pixel position for the wave number display). | ||
| 53433 | CALL PrintDispatch | Call PrintDispatch; the PRINT AT X handler stores the X position and installs the Y handler. | ||
| 53436 | LD A,187 | A=187 (Y pixel position). | ||
| 53438 | CALL PrintDispatch | Call PrintDispatch; the PRINT AT Y handler stores the Y position and restores the default handler. | ||
| 53441 | LD A,(50184) | A=*WaveNumber (BCD wave number). | ||
| 53444 | SRL A | Shift A right four positions to isolate the tens digit (high nibble, 0–9). | ||
| 53446 | SRL A | |||
| 53448 | SRL A | |||
| 53450 | SRL A | |||
| 53452 | OR %00110000 | Convert the tens digit to its ASCII character ("0"–"9"). | ||
| 53454 | CALL PrintDispatch | Call PrintDispatch to print the tens digit. | ||
| 53457 | LD A,(50184) | A=*WaveNumber (BCD wave number again). | ||
| 53460 | AND %00001111 | Isolate the units digit (low nibble, 0–9). | ||
| 53462 | OR %00110000 | Convert the units digit to its ASCII character ("0"–"9"). | ||
| 53464 | CALL PrintDispatch | Call PrintDispatch to print the units digit. | ||
| 53467 | LD A,26 | Call PrintDispatch with 26 (Select Font control code). | ||
| 53469 | CALL PrintDispatch | |||
| 53472 | LD A,1 | Call PrintDispatch with 1 (restore font 1). | ||
| 53474 | CALL PrintDispatch | |||
| 53477 | RET | Return. | ||
| Prev: 53387 | Up: Map | Next: 53478 |