diff --git a/blk/019 b/blk/019 index cb3e4d1..3e3cea9 100644 --- a/blk/019 +++ b/blk/019 @@ -9,3 +9,8 @@ Many blocks contain code. That code can be interpreted through LOAD. Programs stored in blocks frequently have "loader blocks" that take care of loading all blocks relevant to the program. +Blocks spanning multipls disks are tricky. If your media isn't +large enough to hold all Collapse OS blocks in one unit, you'll +have to make it span multiple disks. Block reference in +informational texts aren't a problem: When you swap your disk, +you mentally adjust the block number you fetch. (cont.) diff --git a/blk/020 b/blk/020 new file mode 100644 index 0000000..07197dc --- /dev/null +++ b/blk/020 @@ -0,0 +1,8 @@ +However, absolute LOAD operations in Collapse OS aren't aware +of disk spanning and will not work properly in your spanned +system. + +Although the usage of absolute LOAD calls are minimally used +(relative LOADs are preferred), they are sometimes unavoidable. +When you span Collapse OS over multiple disks, don't forget to +adjust those absolute LOADs. diff --git a/blk/064 b/blk/064 index dc1403a..4fd980a 100644 --- a/blk/064 +++ b/blk/064 @@ -1,15 +1,17 @@ Disk -BLK> -- a Address of the current block variable. -BLK( -- a Beginning addr of blk buf. -BLK) -- a Ending addr of blk buf. -COPY s d -- Copy contents of s block to d block. -FLUSH -- Write current block to disk if dirty. -LIST n -- Prints the contents of the block n on screen - in the form of 16 lines of 64 columns. -LOAD n -- Interprets Forth code from block n -LOADR n1 n2 -- Load block range between n1 and n2, inclusive. -WIPE -- Empties current block +BLK> -- a Address of the current block variable. +BLK( -- a Beginning addr of blk buf. +BLK) -- a Ending addr of blk buf. +COPY s d -- Copy contents of s block to d block. +FLUSH -- Write current block to disk if dirty. +LIST n -- Prints the contents of the block n on screen + in the form of 16 lines of 64 columns. +LOAD n -- Interprets Forth code from block n +LOAD+ n -- Relative load. Loads active block + n. +LOADR n1 n2 -- Load block range between n1 and n2, inclusive. +LOADR+ n1 n2 -- Relative ranged load. +WIPE -- Empties current block diff --git a/blk/102 b/blk/102 index 4207cd7..fabf2da 100644 --- a/blk/102 +++ b/blk/102 @@ -1,9 +1,8 @@ -152 LOAD ( extras ) -103 107 LOADR +50 LOAD+ ( B152, extras ) +1 5 LOADR+ : BROWSE - 100 _LIST - BEGIN + L BEGIN KEY CASE 'Q' OF EXIT ENDOF 'B' OF B ENDOF diff --git a/blk/122 b/blk/122 index f816e23..dfa31f7 100644 --- a/blk/122 +++ b/blk/122 @@ -1 +1 @@ -123 131 LOADR +1 9 LOADR+ diff --git a/blk/142 b/blk/142 index 4715e8e..8ed1836 100644 --- a/blk/142 +++ b/blk/142 @@ -1 +1 @@ -143 144 LOADR +1 2 LOADR+ diff --git a/blk/152 b/blk/152 index e6f2bdf..4e561e4 100644 --- a/blk/152 +++ b/blk/152 @@ -1,3 +1,3 @@ '? CASE NOT [IF] - 153 157 LOADR + 1 5 LOADR+ [THEN] DROP ( from '? ) diff --git a/blk/212 b/blk/212 index 01ef181..9f7459e 100644 --- a/blk/212 +++ b/blk/212 @@ -1,2 +1,2 @@ -213 LOAD Z80A$ -215 249 LOADR +1 LOAD+ Z80A$ +3 37 LOADR+ diff --git a/blk/262 b/blk/262 index d657f75..7766ca5 100644 --- a/blk/262 +++ b/blk/262 @@ -1 +1 @@ -263 LOAD 265 LOAD 268 LOAD 269 LOAD +1 LOAD+ 3 LOAD+ 6 LOAD+ 7 LOAD+ diff --git a/blk/282 b/blk/282 index 53eef2e..8a2a1f6 100644 --- a/blk/282 +++ b/blk/282 @@ -1 +1 @@ -283 333 LOADR +1 51 LOADR+ diff --git a/blk/352 b/blk/352 index 06305c6..5398d52 100644 --- a/blk/352 +++ b/blk/352 @@ -11,5 +11,5 @@ ACIA_MEM +4 ACIA( +6 ACIA) ) -353 355 LOADR +1 3 LOADR+ diff --git a/blk/357 b/blk/357 index 2915f14..2a492bf 100644 --- a/blk/357 +++ b/blk/357 @@ -1 +1 @@ -358 360 LOADR +1 3 LOADR+ diff --git a/blk/374 b/blk/374 index 573dafc..5d7d0b8 100644 --- a/blk/374 +++ b/blk/374 @@ -13,4 +13,4 @@ DUP 20 = UNTIL DROP 0xff ; -375 386 LOADR +1 12 LOADR+ diff --git a/blk/393 b/blk/393 index 105dfdf..0c04a4a 100644 --- a/blk/393 +++ b/blk/393 @@ -12,4 +12,4 @@ 0 0x08 RAM+ ! ( 08 == C<* override ) LIT< INTERPRET (find) DROP EXECUTE ; -394 413 LOADR +1 20 LOADR+ diff --git a/blk/459 b/blk/459 index a6c9ce6..db838a0 100644 --- a/blk/459 +++ b/blk/459 @@ -1,2 +1,4 @@ +: LOAD+ BLK> @ + LOAD ; ( b1 b2 -- ) : LOADR 1+ SWAP DO I DUP . NL LOAD LOOP ; +: LOADR+ BLK> @ + SWAP BLK> @ + SWAP LOADR ; diff --git a/blk/492 b/blk/492 index ba6c95c..a127da9 100644 --- a/blk/492 +++ b/blk/492 @@ -1 +1 @@ -493 497 LOADR +1 5 LOADR+ diff --git a/blk/498 b/blk/498 index 17c50dd..8ed1836 100644 --- a/blk/498 +++ b/blk/498 @@ -1 +1 @@ -499 500 LOADR +1 2 LOADR+ diff --git a/emul/forth.bin b/emul/forth.bin index 1087d29..bbe4158 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ