Prev: FB8E Up: Map Next: FBC8
FBAE: Blank Left-Half Shadow Buffers
Used by the routine at CreateAdminPageTemplate.
Input
C Width
D Height (where to stop)
E Value to write
HL Buffer location
Used both to blank the left-hand side of the screen shadow buffer, and also to add the rainbow attributes for the attributes shadow buffer.
BlankHalfShadowBuffers FBAE LD B,C B=width.
FBAF XOR A A=00.
BlankHalfOfScreen_Row FBB0 LD (HL),E Write the value pass in E to the buffer.
FBB1 INC HL Increment the buffer pointer by one.
FBB2 DJNZ BlankHalfOfScreen_Row Decrease counter by one and loop back to BlankHalfOfScreen_Row until counter is zero.
Move down one row.
FBB4 ADD HL,BC HL+=BC.
FBB5 DEC HL Decrease HL by two (because we always enter with the width being 11 so 11*02=22 and one row contains only 20 bytes).
FBB6 DEC HL
When writing the attributes, this handles the INK rainbow colouring.
FBB7 LD A,E A=E.
FBB8 AND %00000111 Keep only the INK colour bits.
FBBA JR Z,BlankHalfOfScreen_CheckEnd Jump to BlankHalfOfScreen_CheckEnd if the result is zero (if this is the screen buffer loop and not for the attribute buffer).
Cycle through the INK colours.
FBBC INC E Increment the value to write by one.
FBBD CP $07 Jump to BlankHalfOfScreen_CheckEnd if A is not equal to 07 (INK: WHITE, PAPER: BLACK ).
FBBF JR NZ,BlankHalfOfScreen_CheckEnd
Reset the attribute colour to write (the range is 2A-47).
FBC1 LD E,$42 E=42 (INK: RED, PAPER: BLACK (BRIGHT) ).
The height parameter isn't a "height" as such, it's where to stop e.g. the end of ShadowScreenBuffer or the end of ShadowAttributeBuffer.
BlankHalfOfScreen_CheckEnd FBC3 LD A,D Jump to BlankHalfShadowBuffers if D is not equal to H.
FBC4 CP H
FBC5 JR NZ,BlankHalfShadowBuffers
FBC7 RET Return.
Prev: FB8E Up: Map Next: FBC8