Prev: DD35 Up: Map Next: DE60
DE48: 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 0C only the low byte is kept.
ScaleHighByteBySixty DE48 PUSH DE Clear the pointer.
DE49 PUSH BC
DE4A LD C,L
DE4B LD B,H
DE4C LD HL,$0000
DE4F LD DE,$003C Take sixty (3C), the scale for the high byte.
DE52 LD A,B Go to ScaleHighByteBySixty_AddLowByte when the high byte is 0C so only the low byte is kept.
DE53 CP $0C
DE55 JR Z,ScaleHighByteBySixty_AddLowByte
ScaleHighByteBySixty_Hour DE57 ADD HL,DE Add sixty to HL once per hour in B.
DE58 DJNZ ScaleHighByteBySixty_Hour
ScaleHighByteBySixty_AddLowByte DE5A LD B,$00 Clear the high byte of the count.
DE5C ADD HL,BC Advance the pointer by the count.
DE5D POP BC Restore the saved count and the saved source from the stack.
DE5E POP DE
DE5F RET Return.
Prev: DD35 Up: Map Next: DE60