mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 13:18:05 +11:00
Make BLK@* and BLK!* into ialiases
This commit is contained in:
parent
421ca5112f
commit
ac3629b817
@ -85,4 +85,4 @@ RS_ADDR 0xa0 - CONSTANT SYSVARS
|
|||||||
610 LOAD ( AT-XY drivers )
|
610 LOAD ( AT-XY drivers )
|
||||||
390 LOAD ( xcomp core high )
|
390 LOAD ( xcomp core high )
|
||||||
(entry) _ ( Update LATEST ) PC ORG @ 8 + !
|
(entry) _ ( Update LATEST ) PC ORG @ 8 + !
|
||||||
," BLK$ FD$ ' FD@ BLK@* ! ' FD! BLK!* ! " EOT,
|
," BLK$ FD$ ' FD@ ' BLK@* **! ' FD! ' BLK!* **! " EOT,
|
||||||
|
@ -39,7 +39,7 @@ CREATE ~FNT CPFNT5x7
|
|||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," TMS$ GRID$ PS2$ BLK$ ' SDC@ BLK@* ! (im1) " EOT,
|
," TMS$ GRID$ PS2$ BLK$ ' SDC@ ' BLK@* **! (im1) " EOT,
|
||||||
ORG @ 0x100 - DUP |M 2 PC! 2 PC!
|
ORG @ 0x100 - DUP |M 2 PC! 2 PC!
|
||||||
DUP 1 ( 16K ) segasig
|
DUP 1 ( 16K ) segasig
|
||||||
0x4000 + |M 2 PC! 2 PC!
|
0x4000 + |M 2 PC! 2 PC!
|
||||||
|
@ -98,7 +98,7 @@ EXX, ( unprotect BC ) ;CODE
|
|||||||
( ----- 610 )
|
( ----- 610 )
|
||||||
: FD@ ['] @RDSEC SWAP FD@! ;
|
: FD@ ['] @RDSEC SWAP FD@! ;
|
||||||
: FD! ['] @WRSEC SWAP FD@! ;
|
: FD! ['] @WRSEC SWAP FD@! ;
|
||||||
: FD$ ['] FD@ BLK@* ! ['] FD! BLK!* ! ;
|
: FD$ ['] FD@ ['] BLK@* **! ['] FD! ['] BLK!* **! ;
|
||||||
|
|
||||||
: CL$ 0x02 0xe8 PC! ( UART RST ) 0xee 0xe9 PC! ( 9600 bauds )
|
: CL$ 0x02 0xe8 PC! ( UART RST ) 0xee 0xe9 PC! ( 9600 bauds )
|
||||||
0b01101100 0xea PC! ( word8 no parity RTS ) ;
|
0b01101100 0xea PC! ( word8 no parity RTS ) ;
|
||||||
|
@ -38,6 +38,6 @@ CODE (key?) ( TODO: make non-blocking )
|
|||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," BLK$ FD$ ' FD@ BLK@* ! ' FD! BLK!* ! " EOT,
|
," BLK$ FD$ ' FD@ ' BLK@* **! ' FD! ' BLK!* **! " EOT,
|
||||||
ORG @ |M 2 PC! 2 PC!
|
ORG @ |M 2 PC! 2 PC!
|
||||||
H@ |M 2 PC! 2 PC!
|
H@ |M 2 PC! 2 PC!
|
||||||
|
12
blk.fs
12
blk.fs
@ -833,7 +833,7 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 , CREATE xoff 0 ,
|
|||||||
: $H EDPOS @ 0x3c0 AND pos! ;
|
: $H EDPOS @ 0x3c0 AND pos! ;
|
||||||
: $L EDPOS @ 0x3f OR pos! ;
|
: $L EDPOS @ 0x3f OR pos! ;
|
||||||
: $g ACC @ 1 MAX 1- 64 * pos! ;
|
: $g ACC @ 1 MAX 1- 64 * pos! ;
|
||||||
: $@ BLK> @ BLK@* @ EXECUTE 0 BLKDTY ! contents ;
|
: $@ BLK> @ BLK@* 0 BLKDTY ! contents ;
|
||||||
( ----- 130 )
|
( ----- 130 )
|
||||||
: $w EDPOS @ BLK( + acc@ 0 DO
|
: $w EDPOS @ BLK( + acc@ 0 DO
|
||||||
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
|
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
|
||||||
@ -1911,9 +1911,9 @@ SYSVARS 0x55 + :** KEY?
|
|||||||
: [THEN] ;
|
: [THEN] ;
|
||||||
( ----- 372 )
|
( ----- 372 )
|
||||||
( n -- Fetches block n and write it to BLK( )
|
( n -- Fetches block n and write it to BLK( )
|
||||||
: BLK@* 0x34 RAM+ ;
|
SYSVARS 0x34 + :** BLK@*
|
||||||
( n -- Write back BLK( to storage at block n )
|
( n -- Write back BLK( to storage at block n )
|
||||||
: BLK!* 0x36 RAM+ ;
|
SYSVARS 0x36 + :** BLK!*
|
||||||
( Current blk pointer in ( )
|
( Current blk pointer in ( )
|
||||||
: BLK> 0x38 RAM+ ;
|
: BLK> 0x38 RAM+ ;
|
||||||
( Whether buffer is dirty )
|
( Whether buffer is dirty )
|
||||||
@ -1931,13 +1931,11 @@ SYSVARS 0x55 + :** KEY?
|
|||||||
-1 BLK> !
|
-1 BLK> !
|
||||||
;
|
;
|
||||||
( ----- 374 )
|
( ----- 374 )
|
||||||
: BLK! ( -- )
|
: BLK! ( -- ) BLK> @ BLK!* 0 BLKDTY ! ;
|
||||||
BLK> @ BLK!* @ EXECUTE
|
|
||||||
0 BLKDTY ! ;
|
|
||||||
: FLUSH BLKDTY @ IF BLK! THEN -1 BLK> ! ;
|
: FLUSH BLKDTY @ IF BLK! THEN -1 BLK> ! ;
|
||||||
: BLK@ ( n -- )
|
: BLK@ ( n -- )
|
||||||
DUP BLK> @ = IF DROP EXIT THEN
|
DUP BLK> @ = IF DROP EXIT THEN
|
||||||
FLUSH DUP BLK> ! BLK@* @ EXECUTE ;
|
FLUSH DUP BLK> ! BLK@* ;
|
||||||
: BLK!! 1 BLKDTY ! ;
|
: BLK!! 1 BLKDTY ! ;
|
||||||
: WIPE BLK( 1024 0 FILL BLK!! ;
|
: WIPE BLK( 1024 0 FILL BLK!! ;
|
||||||
: WIPED? ( -- f )
|
: WIPED? ( -- f )
|
||||||
|
@ -9,7 +9,7 @@ SYSVARS 0xa0 + CONSTANT GRID_MEM
|
|||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," BLK$ ' EFS@ BLK@* ! ' EFS! BLK!* ! GRID$ " EOT,
|
," BLK$ ' EFS@ ' BLK@* **! ' EFS! ' BLK!* **! GRID$ " EOT,
|
||||||
ORG @ |M 2 PC! 2 PC!
|
ORG @ |M 2 PC! 2 PC!
|
||||||
H@ |M 2 PC! 2 PC!
|
H@ |M 2 PC! 2 PC!
|
||||||
|
|
||||||
|
BIN
cvm/stage.bin
BIN
cvm/stage.bin
Binary file not shown.
@ -4,8 +4,8 @@
|
|||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," BLK$ "
|
," BLK$ "
|
||||||
," ' EFS@ BLK@* ! "
|
," ' EFS@ ' BLK@* **! "
|
||||||
," ' EFS! BLK!* ! "
|
," ' EFS! ' BLK!* **! "
|
||||||
EOT,
|
EOT,
|
||||||
ORG @ |M 2 PC! 2 PC!
|
ORG @ |M 2 PC! 2 PC!
|
||||||
H@ |M 2 PC! 2 PC!
|
H@ |M 2 PC! 2 PC!
|
||||||
|
@ -15,8 +15,9 @@ The subsystem is loaded with "423 436 LOADR".
|
|||||||
|
|
||||||
Initialization of the SDC system is done in multiple steps.
|
Initialization of the SDC system is done in multiple steps.
|
||||||
First, the BLK system needs to be initialized with "BLK$". Then
|
First, the BLK system needs to be initialized with "BLK$". Then
|
||||||
you can plug SDC@ and SDC! into BLK with "' SDC@ BLK@* !" and
|
you can plug SDC@ and SDC! into BLK with "' SDC@ ' BLK@* **!"
|
||||||
"' SDC! BLK! !". That only needs to be done once per boot.
|
and "' SDC! ' BLK! **!". That only needs to be done once per
|
||||||
|
boot.
|
||||||
|
|
||||||
Then, the SD card that was inserted needs to be initialized. You
|
Then, the SD card that was inserted needs to be initialized. You
|
||||||
can do it with "SDC$". If you have no error, it means that the
|
can do it with "SDC$". If you have no error, it means that the
|
||||||
|
@ -172,6 +172,7 @@ SYSVARS FUTURE USES +3c BLK(*
|
|||||||
+2e BOOT C< PTR +57 FUTURE USES
|
+2e BOOT C< PTR +57 FUTURE USES
|
||||||
+30 IN> +60 INPUT BUFFER
|
+30 IN> +60 INPUT BUFFER
|
||||||
+32 FUTURE USES +a0 DRIVERS
|
+32 FUTURE USES +a0 DRIVERS
|
||||||
|
+34 BLK@*
|
||||||
+36 BLK!*
|
+36 BLK!*
|
||||||
+38 BLK>
|
+38 BLK>
|
||||||
+3a BLKDTY
|
+3a BLKDTY
|
||||||
|
@ -19,8 +19,8 @@ CODE PC! AX POPx, ( discard ) AX POPx, 6 INT, ;CODE
|
|||||||
390 LOAD ( xcomp core high )
|
390 LOAD ( xcomp core high )
|
||||||
(entry) _ ( Update LATEST ) PC ORG @ 8 + !
|
(entry) _ ( Update LATEST ) PC ORG @ 8 + !
|
||||||
," BLK$ "
|
," BLK$ "
|
||||||
," ' EFS@ BLK@* ! "
|
," ' EFS@ ' BLK@* **! "
|
||||||
," ' EFS! BLK!* ! "
|
," ' EFS! ' BLK!* **! "
|
||||||
EOT,
|
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!
|
||||||
|
@ -28,8 +28,8 @@ RS_ADDR 0xa0 - CONSTANT SYSVARS
|
|||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," BLK$ "
|
," BLK$ "
|
||||||
," ' EFS@ BLK@* ! "
|
," ' EFS@ ' BLK@* **! "
|
||||||
," ' EFS! BLK!* ! "
|
," ' EFS! ' BLK!* **! "
|
||||||
EOT,
|
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