![]() |
Routines |
| Prev: B78F | Up: Map | Next: B7D3 |
|
Print "You Have Scored"
|
||||
|
Print it: You have scored .
|
||||
| Messaging_YouHaveScored_Print | B79E | LD HL,$B1C4 | Point at the message and print it. | |
| B7A1 | CALL PrintString | |||
| B7A4 | LD HL,($AECE) | Load the word at the score into HL. | ||
| B7A7 | LD A,H | Take the hundreds digit. | ||
| B7A8 | AND $0F | Skip a leading zero in the hundreds digit. | ||
| B7AA | JR Z,PrintScore_Tens | |||
| B7AC | ADD A,$30 | Add 30. | ||
| B7AE | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
| PrintScore_Tens | B7B1 | LD A,L | Take the tens and units. | |
| B7B2 | AND $F0 | Print the tens digit when it is not zero. | ||
| B7B4 | JR NZ,PrintScore_TensDigit | |||
| B7B6 | LD A,H | Skip a leading zero in the tens digit. | ||
| B7B7 | AND A | |||
| B7B8 | JR Z,PrintScore_Units | |||
| B7BA | XOR A | The tens digit is zero but there is a hundreds digit, so print a "0". | ||
| PrintScore_TensDigit | B7BB | RRCA | Move the tens digit into the low four bits. | |
| B7BC | RRCA | |||
| B7BD | RRCA | |||
| B7BE | RRCA | |||
| B7BF | ADD A,$30 | Add 30. | ||
| B7C1 | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
| PrintScore_Units | B7C4 | LD A,L | Take the units digit. | |
| B7C5 | AND $0F | Mask with 0F. | ||
| B7C7 | ADD A,$30 | Add 30. | ||
| B7C9 | CALL PrintCharacter | Call PrintCharacter to print the character. | ||
|
Print it and start a new line: %..
|
||||
| B7CC | LD HL,$B1D5 | Point at the message and print it and start a new line. | ||
| B7CF | CALL PrintStringAndANewline | |||
| B7D2 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: B78F | Up: Map | Next: B7D3 |