![]()  | 
Routines | 
| Prev: 49162 | Up: Map | Next: 49240 | 
| 
 
Used by the routine at Handler_UserInput.
 
Handles the user pressing delete.
 
  | 
||||||||
| 
 
Test if the current position in the command buffer is at the start (48436) of the buffer.
 
 | 
||||||||
| UserInput_Delete | 49217 | EX DE,HL | Jump back to UserInput_Loop if the user is already at the beginning of the command buffer. | |||||
| 49218 | LD HL,48436 | |||||||
| 49221 | AND A | |||||||
| 49222 | SBC HL,DE | |||||||
| 49224 | EX DE,HL | |||||||
| 49225 | JR Z,UserInput_Loop | |||||||
| 
 
Else delete the current character.
 
 | 
||||||||
| 49227 | PUSH HL | Stash the pointer to the command buffer on the stack. | ||||||
| 
 
Print "BACKSPACE SPACE BACKSPACE" to move the current print position on the screen to the previous character, and to delete the charactr present using a space.
 
 | 
||||||||
| 49228 | LD HL,48520 | HL=Messaging_BackspaceSpaceBackspace. | ||||||
| 49231 | CALL PrintString | Call PrintString. | ||||||
| 49234 | POP HL | Restore the pointer to the command buffer from the stack. | ||||||
| 
 
Now adjust the command buffer pointer to match the new position.
 
 | 
||||||||
| 49235 | DEC HL | Decrease the pointer to the command buffer by one. | ||||||
| 49236 | LD (HL),32 | Write an ASCII space (32) into the command buffer at the current position. | ||||||
| 49238 | JR UserInput_Loop | Jump to UserInput_Loop. | ||||||
| Prev: 49162 | Up: Map | Next: 49240 |