lda #$A1 ; full white square\r
sta (SCREEN_PTR),y ; store at cursor position\r
nocursor:\r
- jsr INPUTC\r
- pha ; save retrieved character\r
- lda cursor ; was cursor on?\r
- beq nocursor2\r
+ jsr INPUTC ; get input character in A\r
+ ldx cursor\r
+ beq done ; was cursor on?\r
+ tax ; save A in X\r
lda tmp1 ; fetch saved character\r
ldy CURS_X\r
sta (SCREEN_PTR),y ; store at cursor position\r
-nocursor2:\r
- pla ; restore retrieved character\r
+ txa ; restore saved character from X\r
+ ldx #$00 ; high byte of int return value\r
+done:\r
rts\r