Prev: 8DE3 Up: Map Next: 8E23
8E0F: Print Handler: Newline
Used by the routines at PrintHandler and PrintHandler_Render.
Carriage return handler: resets the X position to the left margin, then advances the Y position by one font line height (wrapping at BC).
PrintHandler_Newline 8E0F LD HL,$8001 HL=PrintState_X (X position pointer).
8E12 LD A,($8005) Write *PrintState_LeftMargin (left margin X position) to *HL, resetting X to the left margin.
8E15 LD (HL),A
8E16 DEC HL HL=PrintState_Y (Y position pointer).
This entry point is used by the routine at PrintHandler_Tab.
PrintHandler_AdvanceRow 8E17 LD A,(HL) A=*HL + font line height (*PrintState_LineHeight).
8E18 ADD A,(IX+$10)
8E1B CP $BC Wrap the Y position at BC if it has reached or exceeded that value.
8E1D JR C,PrintHandler_AdvanceRow_Store
8E1F SUB $BC Subtract BC to wrap Y.
PrintHandler_AdvanceRow_Store 8E21 LD (HL),A Write the new Y position back to *HL.
8E22 RET Return.
Prev: 8DE3 Up: Map Next: 8E23