Prev: BADC Up: Map Next: BB9E
BB6B: Draw a row of borders for the windows
Computes the pointer on display file and draw a row of borders for the windows. Used by the routine at BADC.
Input
IX Point to the address of the graphics data for the left border tile
IY point to the address of the graphics data for the middle border tile
HL Point to the addres into the display file look up table corresponding to the row of pixels to draw
BB6B LD B,$08 Set B=8
BB6D LD E,(HL) Set DE to point to the address on the display file to draw the corner
BB6E INC HL
BB6F LD D,(HL)
BB70 INC DE Increment the pointer by 2. All the windows has a margin of 2 bytes
BB71 INC DE
BB72 PUSH HL Save HL briefly
BB73 LD A,($A1C1) Set HL to the horizontal position of the windows
BB76 LD L,A
BB77 LD H,$00
BB79 ADD HL,DE Point HL to the address of this location in display file
BB7A EX DE,HL Exchange DE with HL
BB7B POP HL Restore HL
BB7C CALL $BB82 Draw one row of pixels for this border
BB7F DJNZ $BB6D Jump back while there are remaining pixels to draw
BB81 RET
This routine draws the corresponding pixels of the tiles borders into display file
BB82 PUSH BC Save BC
BB83 LD A,(IX+$00) Put the byte of the left border tile into display file
BB86 LD (DE),A
BB87 INC DE Increment the pointer to the display file
BB88 LD A,($A1C3) Set B to the length of the longest line
BB8B LD B,A
BB8C LD A,(IY+$00) Put the byte of the middle border tile into display file
BB8F LD (DE),A
BB90 INC DE Increment the pointer to the display files
BB91 DJNZ $BB8C Jump back while there are middle borders to show
BB93 LD A,(IX+$08) Put the byte of the right border tile into display file
BB96 LD (DE),A
BB97 INC IY Point to the next byte of the middle border tile
BB99 INC IX Point to the next byte of the left border tile
BB9B INC HL Point to the next address into the display file lookup table
BB9C POP BC Recover BC
BB9D RET
Prev: BADC Up: Map Next: BB9E