![]() |
Routines |
| Prev: 54487 | Up: Map | Next: 54525 |
|
Used by the routines at PrintTelegram, TypeTelegram, PrintLargeText, HandleMenuBullet, PrintOutlawName and PrintText.
Converts a character into the number of its tile in Font. The space is 0, the digits are from 1 to 10 and the letters begin at 11. A character which is not one of these gives a number which has other bits set.
|
||||||||||||
|
Make a space into zero.
|
||||||||||||
| ConvertCharacter | 54506 | SUB 32 | Take away 32, and keep it in C. | |||||||||
| 54508 | LD C,A | |||||||||||
| 54509 | AND %00111111 | Keep only bits 0-5. | ||||||||||
| 54511 | RET Z | Return if it is a space. | ||||||||||
|
Make the digits begin at one.
|
||||||||||||
| 54512 | LD A,C | Take away 15, and keep it in C. | ||||||||||
| 54513 | SUB 15 | |||||||||||
| 54515 | LD C,A | |||||||||||
| 54516 | AND %00111111 | Keep only bits 0-5. | ||||||||||
| 54518 | CP 11 | Return if it is a digit. | ||||||||||
| 54520 | RET C | |||||||||||
|
Make the letters begin at eleven.
|
||||||||||||
| 54521 | LD A,C | Take away 7. | ||||||||||
| 54522 | SUB 7 | |||||||||||
| 54524 | RET | Return. | ||||||||||
| Prev: 54487 | Up: Map | Next: 54525 |