(notepad) Display blinking cursor at position

This commit is contained in:
Devine Lu Linvega 2023-04-26 12:31:17 -07:00
parent 5e35f5b303
commit 1493b723f2
1 changed files with 16 additions and 4 deletions

View File

@ -25,6 +25,8 @@
;on-frame .Screen/vector DEO2
;on-control .Controller/vector DEO2
;mem select-from
draw-header
draw-note
@ -283,17 +285,27 @@ JMP2r
.Screen/y DEI2k #0010 ADD2 ROT DEO2
INC2 LDAk ?&while
&no-wrap
LDAk #20 SUB #00 SWP
DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
OVR2 is-selected STH #0701 STHr JMP SWP POP .Screen/sprite DEOk DEO
( display cursor )
.selection/from LDZ2 .selection/to LDZ2 NEQ2 ?&block
OVR2 .selection/from LDZ2 NEQ2 ?&block
;on-frame/last LDA #01 AND ?&block
;blink-icn .Screen/addr DEO2
.Screen/x DEI2k #0010 SUB2 ROT DEO2
#05 .Screen/sprite DEO
&block
.Screen/x DEO2
INC2 LDAk ?&while
POP2
( draw cursor )
;blink-icn .Screen/addr DEO2
;on-frame/last LDA #01 AND .Screen/sprite DEO
@draw-footer ( -- )
@ -326,7 +338,7 @@ JMP2r
@is-selected ( addr* -- f )
DUP2 .selection/from LDZ2 LTH2 ?&false
DUP2 .selection/to LDZ2 GTH2 ?&false
DUP2 .selection/to LDZ2 #0001 SUB2 GTH2 ?&false
POP2 #01
JMP2r