mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 08:08:06 +11:00
cvm: use Grid in /cvm/forth
Also, fixed broken AT-XY in Grid...
This commit is contained in:
parent
95ab1ad588
commit
c939c7e84a
2
blk.fs
2
blk.fs
@ -2221,7 +2221,7 @@ Load range: B402-B403
|
|||||||
( ----- 402 )
|
( ----- 402 )
|
||||||
: XYPOS [ GRID_MEM LITN ] ;
|
: XYPOS [ GRID_MEM LITN ] ;
|
||||||
: _cl* COLS LINES * ;
|
: _cl* COLS LINES * ;
|
||||||
: AT-XY ( x y -- ) LINES * + _cl* MOD XYPOS ! ;
|
: AT-XY ( x y -- ) COLS * + _cl* MOD XYPOS ! ;
|
||||||
'? NEWLN NIP NOT [IF]
|
'? NEWLN NIP NOT [IF]
|
||||||
: NEWLN ( ln -- ) COLS * DUP COLS + SWAP DO 0 I CELL! LOOP ;
|
: NEWLN ( ln -- ) COLS * DUP COLS + SWAP DO 0 I CELL! LOOP ;
|
||||||
[THEN]
|
[THEN]
|
||||||
|
@ -15,7 +15,7 @@ $(BLKUNPACK): $(BLKPACK)
|
|||||||
stage: stage.c $(OBJS) blkfs
|
stage: stage.c $(OBJS) blkfs
|
||||||
$(CC) -DFBIN_PATH=\"`pwd`/stage.bin\" -DBLKFS_PATH=\"`pwd`/blkfs\" stage.c $(OBJS) -o $@
|
$(CC) -DFBIN_PATH=\"`pwd`/stage.bin\" -DBLKFS_PATH=\"`pwd`/blkfs\" stage.c $(OBJS) -o $@
|
||||||
|
|
||||||
blkfs: $(BLKPACK)
|
blkfs: ../blk.fs $(BLKPACK)
|
||||||
$(BLKPACK) < ../blk.fs > $@
|
$(BLKPACK) < ../blk.fs > $@
|
||||||
|
|
||||||
forth.bin: stage common.fs forth.fs blkfs
|
forth.bin: stage common.fs forth.fs blkfs
|
||||||
|
12
cvm/forth.fs
12
cvm/forth.fs
@ -1,15 +1,15 @@
|
|||||||
: (emit) 0 PC! ;
|
|
||||||
: COLS 80 ; : LINES 32 ;
|
: COLS 80 ; : LINES 32 ;
|
||||||
: AT-XY 6 PC! ( y ) 5 PC! ( x ) ;
|
: CELL! ( g pos -- )
|
||||||
|
COLS /MOD 6 PC! ( y ) 5 PC! ( x ) 0x20 + 0 PC! ;
|
||||||
|
: NEWLN ( ln -- ) DROP 0xa 0 PC! ;
|
||||||
|
|
||||||
|
SYSVARS 0x70 + CONSTANT GRID_MEM
|
||||||
|
402 403 LOADR ( Grid )
|
||||||
390 LOAD ( xcomp core high )
|
390 LOAD ( xcomp core high )
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," BLK$ "
|
," BLK$ ' EFS@ BLK@* ! ' EFS! BLK!* ! 0 0 AT-XY " EOT,
|
||||||
," ' EFS@ BLK@* ! "
|
|
||||||
," ' EFS! BLK!* ! "
|
|
||||||
EOT,
|
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user