Prev: F544 Up: Map Next: F5C4
F56A: Initialise Display
Used by the routine at JumpTable_InitialiseDisplay.
Opens the upper screen, builds the line-address table and fills the IM 02 vector page at FD00 with FE.
Initialise_Display F56A LD A,$00 Write 00 to *DF_SZ.
F56C LD ($5C6B),A
F56F LD A,$02 Open channel 02 via CHAN_OPEN.
F571 CALL $1601
Build 19 display-file addresses from CL_SET.
F574 LD HL,$FF04 HL=FF04.
F577 LD BC,$0121 BC=0121.
F57A PUSH HL Stash the table pointer on the stack.
Initialise_Display_Continue F57B PUSH BC Stash the position on the stack.
F57C CALL $0DD9 Call CL_SET.
F57F POP BC Fetch *DF_CC and add 21.
F580 LD DE,($5C84)
F584 LD HL,$0021
F587 ADD HL,DE
F588 EX DE,HL
F589 POP HL Store that address in the table.
F58A LD (HL),E
F58B INC HL
F58C LD (HL),D
F58D INC HL
F58E PUSH HL
F58F INC B Increase the row and jump to Initialise_Display_Continue until 19 rows are stored.
F590 LD A,B
F591 CP $19
F593 JR NZ,Initialise_Display_Continue
F595 POP HL Drop the leftover table pointer.
F596 LD BC,$0018 Write the default clip window to *ClipWindow.
F599 LD ($6419),BC
F59D LD BC,$0121
F5A0 LD ($641B),BC
F5A4 LD DE,$5CB7 Clear seven bytes at UDG.
F5A7 LD HL,$5CB6
F5AA LD BC,$0007
F5AD LD (HL),$00
F5AF LDIR
F5B1 LD HL,$643E Write 00 to *Sprite_ShiftBuffer.
F5B4 LD (HL),$00
F5B6 LD HL,$FD00 Fill 0100 bytes at FD00 with FE.
F5B9 LD DE,$FD01
F5BC LD BC,$0100
F5BF LD (HL),$FE
F5C1 LDIR
F5C3 RET Return.
View the equivalent code in Booty.
Prev: F544 Up: Map Next: F5C4