Prev: 35940 Up: Map Next: 36077
35994: Blank the interior of an area of the display file (i.e. set bytes to zero)
Used by the routine at 34990.
35994 PUSH IX Store IX
35996 LD BC,(23493) Load B with y-coordinate of top, and C with x-coordinate of left of area to fill
36000 LD DE,(23495) Load D with y-coordinate of bottom, and E with x-coordinate of right of area to fill
36004 LD L,C Load HL with x-coordinate of left of area to fill...
36005 LD H,0 ...
36007 LD (36054),HL ...and store as operand of instruction at 36053
36010 LD A,D Load A with y-coordinate of bottom of area to fill...
36011 SUB B ...subtract B (y-coordinate of top of area to fill)...
36012 INC A ...and add one to give number of rows to fill
36013 ADD A,A Multiply A by eight to get number of pixel rows to fill...
36014 ADD A,A ...
36015 ADD A,A ...
36016 LD (36045),A ...and store as operand of instruction at 36044
36019 LD A,B Load A with y-coordinate of top of area to fill (characters)...
36020 ADD A,A ...and multiply by eight to get y-coordinate in pixels...
36021 ADD A,A ...
36022 ADD A,A ...
36023 LD L,A Load y-coordinate (pixels) into HL...
36024 LD H,0 ...
36026 ADD HL,HL Double HL (as entries in table at 26240 are two bytes wide)
36027 PUSH DE Store DE (coordinates of bottom right of area to fill)
36028 LD DE,26240 Point DE at table of display file addresses of start of each pixel row
36031 ADD HL,DE Add HL as offset, in HL
36032 POP DE Restore DE (coordinates of bottom right of area to fill)
36033 PUSH HL Copy pointer to entry in table of display file addresses for start of pixel row at top of area to fill from HL to IX...
36034 POP IX ...
36036 LD A,E Load A with x-coordinate of right of area to fill (characters)...
36037 SUB C ...subtract C (x-coordinate of left of area to fill)...
36038 LD L,A ...and load into HL...
36039 LD H,0 ...
36041 LD (36061),HL ...and store as operand of instruction at 36060
The operand of the instruction at 36044 represents the number of pixel rows to fill. This is modified by the instruction at 36016.
36044 LD B,0 Load B with number of pixel rows to fill
36046 PUSH BC Store BC (B = remaining number of pixel rows to fill)
36047 LD L,(IX+0) Load HL with display file address of start of current pixel row...
36050 LD H,(IX+1) ...
The operand of the instruction at 36053 represents the x-coordinate of the area to fill (characters). This is modified by the instruction at 36007.
36053 LD BC,0 Load BC with x-coordinate of area to fill (characters)...
36056 ADD HL,BC ...and add to HL as offset
36057 PUSH HL Copy display file address of left-most byte of top pixel row of area to fill from HL to DE...
36058 POP DE ...
36059 INC DE Advance DE to next address in display file
The operand of the instruction at 36060 represents the width, minus 1, of the area to fill (characters). This is modified by the instruction at 36041.
36060 LD BC,0 Load BC with width, minus 1, of area to fill (characters)
36063 LD (HL),0 Set content of this address to zero...
36065 LDIR ...and repeat for remaining BC addresses, clearing entire pixel row within specified x-coordinates
36067 POP BC Restore BC (B = remaining number of pixel rows to fill)
36068 INC IX Advance IX by two bytes to point to start address of next pixel row down in display file...
36070 INC IX ...
36072 DJNZ 36046 Decrease B (remaining number of pixel rows to fill) and loop back to 36046 if not zero
36074 POP IX Restore IX
36076 RET Return
Prev: 35940 Up: Map Next: 36077