![]() |
Routines |
| Prev: 46991 | Up: Map | Next: 47059 |
|
Print "You Have Scored"
|
||||
|
Print it: You have scored .
|
||||
| Messaging_YouHaveScored_Print | 47006 | LD HL,45508 | Point at the message and print it. | |
| 47009 | CALL PrintString | |||
| 47012 | LD HL,(44750) | Load the word at the score into HL. | ||
| 47015 | LD A,H | Take the hundreds digit. | ||
| 47016 | AND 15 | Skip a leading zero in the hundreds digit. | ||
| 47018 | JR Z,PrintScore_Tens | |||
| 47020 | ADD A,48 | Add 48. | ||
| 47022 | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
| PrintScore_Tens | 47025 | LD A,L | Take the tens and units. | |
| 47026 | AND 240 | Print the tens digit when it is not zero. | ||
| 47028 | JR NZ,PrintScore_TensDigit | |||
| 47030 | LD A,H | Skip a leading zero in the tens digit. | ||
| 47031 | AND A | |||
| 47032 | JR Z,PrintScore_Units | |||
| 47034 | XOR A | The tens digit is zero but there is a hundreds digit, so print a "0". | ||
| PrintScore_TensDigit | 47035 | RRCA | Move the tens digit into the low four bits. | |
| 47036 | RRCA | |||
| 47037 | RRCA | |||
| 47038 | RRCA | |||
| 47039 | ADD A,48 | Add 48. | ||
| 47041 | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
| PrintScore_Units | 47044 | LD A,L | Take the units digit. | |
| 47045 | AND 15 | Mask with 15. | ||
| 47047 | ADD A,48 | Add 48. | ||
| 47049 | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
|
Print it and start a new line: %..
|
||||
| 47052 | LD HL,45525 | Point at the message and print it and start a new line. | ||
| 47055 | CALL PrintStringAndANewline | |||
| 47058 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 46991 | Up: Map | Next: 47059 |