Prev: 60842 Up: Map Next: 60930
60893: 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 89 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 60893 PUSH IX Copy the character table pointer from IX to HL.
60895 POP HL
60896 LD A,E Load the current character position from E.
60897 PUSH BC Stash the field count on the stack and search for the current position in the table via Search_Score_Entry_Table.
60898 CALL Search_Score_Entry_Table
60901 POP BC Restore the field count from the stack.
60902 RET NZ Return if the current position is not found.
60903 INC HL Load the next character position from the table and check it against the upper bound in D.
60904 LD A,(HL)
60905 CP D
60906 RET Z Return if the cursor is at its maximum.
60907 LD E,A Update the character position in E.
60908 INC HL Advance and read the attribute column offset.
60909 LD L,(HL)
60910 LD H,89 Set the attribute row to 89 and write INK: WHITE, PAPER: BLACK (BRIGHT) to highlight the new character position.
60912 LD (HL),71
60914 PUSH IX Reload the character table pointer from IX to HL.
60916 POP HL
60917 INC HL Advance to the second table entry.
60918 LD A,D Load the upper bound from D and search for it in the table via Search_Score_Entry_Table.
60919 CALL Search_Score_Entry_Table
60922 INC HL Advance and read the previous attribute column offset.
60923 LD L,(HL)
60924 LD H,89 Set the attribute row to 89 and write the cursor colour to the previous character position.
60926 LD (HL),C
60927 LD D,E Copy the updated character position from E to D.
60928 XOR A Clear A and return to signal the character was updated.
60929 RET
Prev: 60842 Up: Map Next: 60930