1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 03:48:05 +11:00

VE: decouple from core's LIST

I'm planning on de-hardcoding columns in VE a bit to add support
for screens narrower than 67 columns. There's a lot of hardcoding.

Let's begin with not using core's LIST anymore. This allows us to
spit 1-16 numbers only at startup.
This commit is contained in:
Virgil Dupras 2020-11-13 15:19:00 -05:00
parent d1718a90c7
commit 10da104873
3 changed files with 8 additions and 4 deletions

View File

@ -11,6 +11,4 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 ,
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
SPC EDPOS @ 64 /MOD . ',' EMIT . SPC
BLKDTY @ IF '*' EMIT THEN 10 nspcs ;
: contents 3 aty BLK> @ LIST 3 16 gutter ;
: selblk BLK> @ PREVBLK ! BLK@ contents ;
: mode! ( c -- ) 63 0 AT-XY ;
: nums 17 1 DO 2 I + aty I . SPC SPC LOOP ;

View File

@ -1,3 +1,9 @@
: contents 16 0 DO 3 I 3 + AT-XY
64 I * BLK( + DUP 64 + SWAP DO
I C@ 0x20 MAX EMIT LOOP LOOP
3 16 gutter ;
: selblk BLK> @ PREVBLK ! BLK@ contents ;
: mode! ( c -- ) 63 0 AT-XY ;
: pos! ( newpos -- ) EDPOS @ PREVPOS !
DUP 0< IF DROP 0 THEN 1023 MIN EDPOS ! ;
: setpos ( -- ) EDPOS @ 64 /MOD

View File

@ -9,6 +9,6 @@
1 aty ." I: " IBUF bufp
2 aty ." F: " FBUF bufp 0 3 gutter ;
: VE
clrscr 0 ACC ! 0 PREVPOS ! contents
clrscr 0 ACC ! 0 PREVPOS ! nums contents
BEGIN status bufs setpos KEY handle UNTIL
19 aty (infl) ;