(notepad) Housekeeping

This commit is contained in:
Devine Lu Linvega 2023-04-26 21:13:05 -07:00
parent eed2d139a3
commit 1010990b47
1 changed files with 24 additions and 29 deletions

View File

@ -81,7 +81,7 @@ BRK
EQU ?&unchanged EQU ?&unchanged
draw-header draw-header
( release on close button ) ( release on close button )
.Mouse/state DEI #00 NEQ ?&unchanged .Mouse/state DEI ?&unchanged
.Mouse/x DEI2 #0008 SUB2 #000a GTH2 ?&unchanged .Mouse/x DEI2 #0008 SUB2 #000a GTH2 ?&unchanged
#010f DEO #010f DEO
&unchanged &unchanged
@ -93,7 +93,7 @@ BRK
#00e0 .Screen/width DEO2 #00e0 .Screen/width DEO2
#00f8 #0011 #00f8 #0011
#0011 .Screen/height DEI2 EQU2 JMP SWP2 POP2 DUP2 .Screen/height DEI2 EQU2 [ JMP SWP2 POP2 ]
.Screen/height DEO2 .Screen/height DEO2
draw-header draw-header
redraw redraw
@ -233,15 +233,14 @@ JMP2r
@select-reset ( -- ) @select-reset ( -- )
.selection/from LDZ2 select-from .selection/from LDZ2
redraw
JMP2r ( >> )
@select-from ( addr* -- ) @select-from ( addr* -- )
( min ) ;mem GTH2k JMP SWP2 POP2 ( min ) ;mem GTH2k [ JMP SWP2 POP2 ]
( max ) get-eof #0001 SUB2 LTH2k JMP SWP2 POP2 ( max ) get-eof #0001 SUB2 LTH2k [ JMP SWP2 POP2 ]
DUP2 .selection/from STZ2 DUP2 .selection/from STZ2
.selection/to STZ2 .selection/to STZ2
@ -252,8 +251,8 @@ JMP2r
@select-to ( addr* -- ) @select-to ( addr* -- )
( min ) .selection/from LDZ2 GTH2k JMP SWP2 POP2 ( min ) .selection/from LDZ2 GTH2k [ JMP SWP2 POP2 ]
( max ) get-eof #0001 SUB2 LTH2k JMP SWP2 POP2 ( max ) get-eof #0001 SUB2 LTH2k [ JMP SWP2 POP2 ]
.selection/to STZ2 .selection/to STZ2
.selection/to LDZ2 .selection/from LDZ2 SUB2 .selection/length STZ2 .selection/to LDZ2 .selection/from LDZ2 SUB2 .selection/length STZ2
@ -289,16 +288,14 @@ JMP2r
@prev-page ( -- ) @prev-page ( -- )
.page LDZ #01 SUB #07 AND .page STZ .page LDZ #01 SUB #07 AND .page STZ
redraw
JMP2r !redraw
@next-page ( -- ) @next-page ( -- )
.page LDZ INC #07 AND .page STZ .page LDZ INC #07 AND .page STZ
redraw
JMP2r !redraw
@pos-to-line ( y* -- line ) @pos-to-line ( y* -- line )
@ -381,34 +378,34 @@ JMP2r
.Screen/y DEO2 .Screen/y DEO2
#15 .Screen/auto DEO #15 .Screen/auto DEO
;bar-icn/a .Screen/addr DEO2 ;bar-icn/a .Screen/addr DEO2
#01 .Screen/sprite DEO [ LIT2 01 -Screen/sprite ] DEO
( close ) ( close )
;close-icn/default ;close-icn
#00 .Mouse/state DEI #00 NEQ .Mouse/x DEI2 #0008 SUB2 #000a LTH2 AND #00 .Mouse/state DEI #00 NEQ .Mouse/x DEI2 #0008 SUB2 #000a LTH2 AND
#50 SFT2 ADD2 .Screen/addr DEO2 #50 SFT2 ADD2 .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO [ LIT2 01 -Screen/sprite ] DEOk DEO
( lead ) ( lead )
#e9 &l #e9 &l
;bar-icn/b .Screen/addr DEO2 ;bar-icn/b .Screen/addr DEO2
#01 .Screen/sprite DEO [ LIT2 01 -Screen/sprite ] DEO
INC DUP ?&l INC DUP ?&l
POP POP
;bar-icn/b .Screen/addr DEO2 ;bar-icn/b .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO [ LIT2 01 -Screen/sprite ] DEOk DEO
( title ) ( title )
#004b .Screen/x DEO2 #004b .Screen/x DEO2
#86 .Screen/auto DEO #86 .Screen/auto DEO
;title-icn .Screen/addr DEO2 ;title-icn .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO [ LIT2 01 -Screen/sprite ] DEOk DEO
( line ) ( line )
#d2 .Screen/auto DEO #d2 .Screen/auto DEO
#0000 .Screen/x DEO2 #0000 .Screen/x DEO2
#0010 .Screen/y DEO2 #0010 .Screen/y DEO2
;line-icn .Screen/addr DEO2 ;line-icn .Screen/addr DEO2
#01 .Screen/sprite DEO [ LIT2 01 -Screen/sprite ] DEO
#0070 .Screen/x DEO2 #0070 .Screen/x DEO2
#0010 .Screen/y DEO2 #0010 .Screen/y DEO2
#01 .Screen/sprite DEO [ LIT2 01 -Screen/sprite ] DEO
JMP2r JMP2r
@ -421,14 +418,14 @@ JMP2r
&while &while
( draw char ) ( draw char )
LDAk #20 SUB #00 SWP #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 LDAk #20 SUB #00 SWP #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
DUP2 is-selected STH #0701 STHr JMP SWP POP .Screen/sprite DEOk DEO DUP2 is-selected STH #0701 STHr [ JMP SWP POP ] .Screen/sprite DEOk DEO
.Screen/x DEI2k #0010 SUB2 ROT DEO2 .Screen/x DEI2k #0010 SUB2 ROT DEO2
( draw selector ) ( draw selector )
.selection/from LDZ2 .selection/to LDZ2 NEQ2 ?&block .selection/from LDZ2 .selection/to LDZ2 NEQ2 ?&block
DUP2 .selection/from LDZ2 NEQ2 ?&block DUP2 .selection/from LDZ2 NEQ2 ?&block
;on-frame/last LDA #01 AND ?&block ;on-frame/last LDA #01 AND ?&block
;blink-icn .Screen/addr DEO2 ;blink-icn .Screen/addr DEO2
#05 .Screen/sprite DEO [ LIT2 05 -Screen/sprite ] DEO
.Screen/x DEI2k #0008 SUB2 ROT DEO2 .Screen/x DEI2k #0008 SUB2 ROT DEO2
&block &block
walk-char POP walk-char POP
@ -444,14 +441,14 @@ JMP2r
#0000 .Screen/x DEO2 #0000 .Screen/x DEO2
.Screen/height DEI2 #0020 SUB2 .Screen/y DEO2 .Screen/height DEI2 #0020 SUB2 .Screen/y DEO2
;page-icn .Screen/addr DEO2 ;page-icn .Screen/addr DEO2
#01 .Screen/sprite DEOk DEOk DEOk DEO [ LIT2 01 -Screen/sprite ] DEOk DEOk DEOk DEO
( across ) ( across )
#01 .Screen/auto DEO #01 .Screen/auto DEO
#0018 .Screen/x DEO2 #0018 .Screen/x DEO2
.Screen/height DEI2 #0008 SUB2 .Screen/y DEO2 .Screen/height DEI2 #0008 SUB2 .Screen/y DEO2
;page-icn/bottom .Screen/addr DEO2 ;page-icn/bottom .Screen/addr DEO2
#e7 &l #e7 &l
#01 .Screen/sprite DEO [ LIT2 01 -Screen/sprite ] DEO
INC DUP ?&l INC DUP ?&l
POP POP
( page number ) ( page number )
@ -459,7 +456,7 @@ JMP2r
.Screen/width DEI2 #01 SFT2 #0003 SUB2 .Screen/x DEO2 .Screen/width DEI2 #01 SFT2 #0003 SUB2 .Screen/x DEO2
.Screen/height DEI2 #0020 SUB2 .Screen/y DEO2 .Screen/height DEI2 #0020 SUB2 .Screen/y DEO2
#0011 .page LDZ ADD #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 #0011 .page LDZ ADD #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO [ LIT2 01 -Screen/sprite ] DEOk DEO
JMP2r JMP2r
@ -534,10 +531,8 @@ JMP2r
&c [ &c [
0000 00fe 00fe 00fe 00fe 00fe 00fe 0000 ] 0000 00fe 00fe 00fe 00fe 00fe 00fe 0000 ]
@close-icn @close-icn
&default [
0000 00ff 8080 8080 8080 8080 80ff 0000 0000 00ff 8080 8080 8080 8080 80ff 0000
0000 00ef 202f 202f 202f 202f 20ef 0000 ] 0000 00ef 202f 202f 202f 202f 20ef 0000
&active [
0000 00ff 84a4 9580 f180 95a4 84ff 0000 0000 00ff 84a4 9580 f180 95a4 84ff 0000
0000 00ef 20af 202f e02f 20af 20ef 0000 ] 0000 00ef 20af 202f e02f 20af 20ef 0000 ]
@title-icn [ @title-icn [