Prev: 49072 Up: Map Next: 49113
49094: Populate Day Of The Week
Used by the routine at Handler_DateBar.
Input
A Number representing the current day of the week
HL Pointer to the table containing the days of the week strings
IX Pointer to the current date messaging
PopulateDayOfWeek 49094 LD C,A Multiply the day of the week by 3 and store the result in BC.
49095 ADD A,A
49096 ADD A,C
49097 LD C,A
49098 LD B,0
49100 ADD HL,BC Add this to the base address of the table containing the days of the week strings.
Each day string is three characters long (e.g. "Mon" for Monday).
49101 LD B,3 Set a counter in B for three characters.
PopulateDayOfWeek_Loop 49103 LD A,(HL) Fetch a character from the table containing the days of the week strings.
49104 LD (IX+0),A Write the character to the current date messaging.
49107 INC IX Move to the next character in the current date messaging.
49109 INC HL Move to the next character in the days of the week string table.
49110 DJNZ PopulateDayOfWeek_Loop Decrease the character counter by one and loop back to PopulateDayOfWeek_Loop until all three characters of the current day have been copied into the current date messaging bar.
49112 RET Return.
Prev: 49072 Up: Map Next: 49113