Prev: EDAA Up: Map Next: EE02
EDDD: Adjust Name Entry Cursor
Used by the routine at Display_High_Score_Entry_Screen.
Adjusts the cursor within the name entry character field. Searches for the current character position in the table at IX via Search_Score_Entry_Table; if found and within range, updates E, writes INK: WHITE, PAPER: BLACK (BRIGHT) to the new character's attribute cell on the 59 row directly, then updates the previous character's attribute. Simpler than Adjust_Score_Field_Cursor as it addresses the attribute row without calling Calculate_Attr_Cell_Address.
Input
B Entry count for table search
C Cursor colour byte
D Cursor upper bound
E Current character position
IX Name entry character table
Adjust_Name_Entry_Cursor EDDD PUSH IX Copy the character table pointer from IX to HL.
EDDF POP HL
EDE0 LD A,E Load the current character position from E.
EDE1 PUSH BC Stash the field count on the stack and search for the current position in the table via Search_Score_Entry_Table.
EDE2 CALL Search_Score_Entry_Table
EDE5 POP BC Restore the field count from the stack.
EDE6 RET NZ Return if the current position is not found.
EDE7 INC HL Load the next character position from the table and check it against the upper bound in D.
EDE8 LD A,(HL)
EDE9 CP D
EDEA RET Z Return if the cursor is at its maximum.
EDEB LD E,A Update the character position in E.
EDEC INC HL Advance and read the attribute column offset.
EDED LD L,(HL)
EDEE LD H,$59 Set the attribute row to 59 and write INK: WHITE, PAPER: BLACK (BRIGHT) to highlight the new character position.
EDF0 LD (HL),$47
EDF2 PUSH IX Reload the character table pointer from IX to HL.
EDF4 POP HL
EDF5 INC HL Advance to the second table entry.
EDF6 LD A,D Load the upper bound from D and search for it in the table via Search_Score_Entry_Table.
EDF7 CALL Search_Score_Entry_Table
EDFA INC HL Advance and read the previous attribute column offset.
EDFB LD L,(HL)
EDFC LD H,$59 Set the attribute row to 59 and write the cursor colour to the previous character position.
EDFE LD (HL),C
EDFF LD D,E Copy the updated character position from E to D.
EE00 XOR A Clear A and return to signal the character was updated.
EE01 RET
Prev: EDAA Up: Map Next: EE02