Prev: 72B5 Up: Map Next: 7336
7310: Name Entry Delete
Used by the routine at CollectName.
NameEntryDelete 7310 POP HL Restore HL and BC from the stack.
7311 POP BC
7312 XOR A Write 00 to *FlagKeyEntry.
7313 LD ($7336),A
7316 LD A,B Jump to NameEntryCollectInput if B is equal to 0D.
7317 CP $0D
7319 JR Z,NameEntryCollectInput
Move the buffer pointer back one place, and "erase" the character by writing a space to this location.
731B DEC HL Decrease HL by one.
731C LD (HL),$20 Write an ASCII space (20) to *HL.
Now do the same to the screen, action a backspace, print an actual space, and finally, action another backspace to move the cursor to the correct position.
731E LD A,$08 Backspace.
7320 RST $10
7321 LD A,$20 Print an ASCII space " ".
7323 RST $10
7324 LD A,$08 Backspace.
7326 RST $10
7327 INC B Increment B by one.
7328 PUSH BC Stash BC and HL on the stack.
7329 PUSH HL
732A RES 5,(IY+$01) Reset bit 5 of *FLAGS which resets "when a new key has been pressed".
Big pause HALT loop 10000 times, can be interrupted with a keypress.
732E LD BC,$0000 BC=0000.
7331 CALL $1F3D Call PAUSE_1.
7334 JR NameEntryCollectInput_Loop Jump to NameEntryCollectInput_Loop.
Prev: 72B5 Up: Map Next: 7336