Prev: 57888 Up: Map Next: 57990
57947: Clear the playing area (pixels)
Used by the routines at 50747 and 55885.
57947 LD A,14 Playing area is 14 character rows high
57949 LD (60103),A
57952 LD DE,16450 Screen display address for top left of playing area
Clear a character row (8 pixels) of the playing area:
57955 LD C,8 8 pixel rows
57957 LD H,D Copy screen display address from DE to HL
57958 LD L,E
57959 LD B,28 28 character rows to clear
57961 LD (HL),0 Clear pixel byte
57963 INC L Move on character square right
57964 DJNZ 57961 Repeat for 28 character rows
57966 INC H Move down 1 pixel
57967 DEC C
57968 JR NZ,57958 Repeat for 8 pixel rows
Move down to next (character) row:
57970 LD A,E Get starting left hand position
57971 ADD A,32 Move down to next character square
57973 LD E,A Are we crossing a third-of-screen boundary?
57974 JR NC,57980
57976 LD A,D If so, recalculate screen display high-byte accordingly
57977 ADD A,8
57979 LD D,A Store corrected screen address high byte back in D register
Check if all character rows have been cleared:
57980 LD A,(60103) Get character row counter
57983 DEC A ...and decrement
57984 LD (60103),A
57987 JR NZ,57955 Repeat for all 14 character squares of playing area
57989 RET
Prev: 57888 Up: Map Next: 57990