Prev: BFB0 Up: Map Next: BFD9
BFC6: 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 BFC6 LD C,A Multiply the day of the week by 03 and store the result in BC.
BFC7 ADD A,A
BFC8 ADD A,C
BFC9 LD C,A
BFCA LD B,$00
BFCC 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).
BFCD LD B,$03 Set a counter in B for three characters.
PopulateDayOfWeek_Loop BFCF LD A,(HL) Fetch a character from the table containing the days of the week strings.
BFD0 LD (IX+$00),A Write the character to the current date messaging.
BFD3 INC IX Move to the next character in the current date messaging.
BFD5 INC HL Move to the next character in the days of the week string table.
BFD6 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.
BFD8 RET Return.
Prev: BFB0 Up: Map Next: BFD9