Prev: 56629 Up: Map Next: 56928
56904: Scale The High Byte By Sixty
Used by the routine at DescribeObjectIfPresent.
Returns the low byte plus sixty times the high byte. When the high byte is 12 only the low byte is kept.
ScaleHighByteBySixty 56904 PUSH DE Clear the pointer.
56905 PUSH BC
56906 LD C,L
56907 LD B,H
56908 LD HL,0
56911 LD DE,60 Take sixty (60), the scale for the high byte.
56914 LD A,B Go to ScaleHighByteBySixty_AddLowByte when the high byte is 12 so only the low byte is kept.
56915 CP 12
56917 JR Z,ScaleHighByteBySixty_AddLowByte
ScaleHighByteBySixty_Hour 56919 ADD HL,DE Add sixty to HL once per hour in B.
56920 DJNZ ScaleHighByteBySixty_Hour
ScaleHighByteBySixty_AddLowByte 56922 LD B,0 Clear the high byte of the count.
56924 ADD HL,BC Advance the pointer by the count.
56925 POP BC Restore the saved count and the saved source from the stack.
56926 POP DE
56927 RET Return.
Prev: 56629 Up: Map Next: 56928