![]() |
Routines |
Prev: 24934 | Up: Map | Next: 24989 |
|
||||||||||||||
print_score | 24935 | LD (_DIGITS_LEFT_TO_PRINT),A | Stash A | |||||||||||
24938 | PUSH BC | Push cx,cy location to print at | ||||||||||||
24939 | CALL gen_printable_score | IX points to the 5 digits to print | ||||||||||||
24942 | LD A,(_DIGITS_LEFT_TO_PRINT) | Recover A | ||||||||||||
24945 | NEG | 2s complement | ||||||||||||
24947 | ADD A,5 | If A is less than the assumed length of 5 digits we bump IX along to reduce the length of the number printed. | ||||||||||||
24949 | JR Z,print_score_1 | |||||||||||||
print_score_0 | 24951 | INC IX | ||||||||||||
24953 | DEC A | |||||||||||||
24954 | JR NZ,print_score_0 | |||||||||||||
print_score_1 | 24956 | LD A,(IX+0) | A contains digit to print | |||||||||||
24959 | INC IX | Next digit | ||||||||||||
24961 | CALL find_digit_udg | HL points to UDG | ||||||||||||
24964 | POP BC | Retrieve x,y | ||||||||||||
24965 | LD D,B | Use DE to add one to the cx value, push ready for next iteration, it's taken off by the POP BC | ||||||||||||
24966 | LD E,C | |||||||||||||
24967 | INC E | |||||||||||||
24968 | PUSH DE | |||||||||||||
24969 | CALL print_udg | Print digit | ||||||||||||
24972 | LD A,(_DIGITS_LEFT_TO_PRINT) | One more done | ||||||||||||
24975 | DEC A | |||||||||||||
24976 | LD (_DIGITS_LEFT_TO_PRINT),A | |||||||||||||
24979 | JR NZ,print_score_1 | Back to print next digit | ||||||||||||
24981 | XOR A | Find digit 0 and jump to print it. Tags an extra '0' on the end, this is the x10 multiplier | ||||||||||||
24982 | CALL find_digit_udg | |||||||||||||
24985 | POP BC | |||||||||||||
24986 | JP print_udg |
Prev: 24934 | Up: Map | Next: 24989 |