Added erase
This commit is contained in:
parent
2ce3f60cdc
commit
2afeee9ed5
|
@ -63,24 +63,35 @@ BRK
|
||||||
|
|
||||||
( keys )
|
( keys )
|
||||||
|
|
||||||
,no-keys ~dev/key #00 EQU JMP? POP2
|
,keys-end ~dev/key #00 EQU JMP? POP2
|
||||||
|
|
||||||
|
,no-backspace ~dev/key #08 NEQ JMP? POP2
|
||||||
|
( erase )
|
||||||
|
~position.x #0001 SUB2 =position.x ,select JSR
|
||||||
|
~document.eof #0001 SUB2 =document.eof
|
||||||
|
~selection.from =j ( start -> end )
|
||||||
|
@erase-loop
|
||||||
|
~j #0001 ADD2 LDR ~j STR
|
||||||
|
( incr ) ~j #0001 ADD2 =j
|
||||||
|
,erase-loop ~j ~document.eof LTH2 JMP? POP2
|
||||||
|
( release ) #00 =dev/key
|
||||||
|
,redraw JSR
|
||||||
|
,keys-end JMP
|
||||||
|
@no-backspace
|
||||||
|
|
||||||
( insert )
|
( insert )
|
||||||
~document.eof #0001 ADD2 =document.eof
|
~document.eof #0001 ADD2 =document.eof
|
||||||
|
|
||||||
~document.eof =j ( end -> start )
|
~document.eof =j ( end -> start )
|
||||||
|
|
||||||
@insert-loop
|
@insert-loop
|
||||||
~j #0001 SUB2 LDR ~j STR
|
~j #0001 SUB2 LDR ~j STR
|
||||||
( decr ) ~j #0001 SUB2 =j
|
( decr ) ~j #0001 SUB2 =j
|
||||||
,insert-loop ~j ~selection.from GTH2 JMP? POP2
|
,insert-loop ~j ~selection.from GTH2 JMP? POP2
|
||||||
|
|
||||||
~dev/key ~selection.from STR
|
~dev/key ~selection.from STR
|
||||||
~position.x #0001 ADD2 =position.x ,select JSR
|
~position.x #0001 ADD2 =position.x ,select JSR
|
||||||
( release ) #00 =dev/key
|
( release ) #00 =dev/key
|
||||||
,redraw JSR
|
,redraw JSR
|
||||||
|
|
||||||
@no-keys
|
@keys-end
|
||||||
|
|
||||||
( mouse )
|
( mouse )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue