← B447 Enter a name for the high-score table Map B59C → Step the name-entry cursor right
B585: Step the name-entry cursor left
Steps the name-entry cursor one cell left along the name-entry strip. From the first cell it wraps to the last.
name_cursor_left B585 LD A,(name_entry_cursor) Read the cursor index.
B588 OR A At the left edge? If not, step left; otherwise wrap to the right end.
B589 JR NZ,name_cursor_left_0
B58B LD A,$1D A wrap off the left edge lands on the strip's rightmost cell.
B58D LD HL,ATTR_BASE+$101 Repaint the wrapped-from cell (the strip's leftmost) to the normal bright-white-on-black attribute. The redraw clears only the new index's neighbors, so without this the far end keeps its old highlight.
B590 LD (HL),$47
B592 JR name_cursor_left_1
name_cursor_left_0 B594 DEC A Step one cell left.
name_cursor_left_1 B595 LD (name_entry_cursor),A Commit the new cursor index and play the cursor-move blip.
B598 CALL sfx_name_cursor
B59B RET
← B447 Enter a name for the high-score table Map B59C → Step the name-entry cursor right
Fork me on GitHub