From a5269a1c7c8938282c789993f7847f1e89b9f921 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 14 May 2020 14:49:16 -0400 Subject: [PATCH] Make blk use system RAM --- blk/081 | 30 +++++++++++++++--------------- blk/084 | 7 +++---- blk/416 | 11 +++++------ blk/417 | 5 ++--- emul/forth.bin | Bin 5925 -> 5906 bytes 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/blk/081 b/blk/081 index 83ee781..fa18965 100644 --- a/blk/081 +++ b/blk/081 @@ -1,16 +1,16 @@ -RAMSTART FUTURE USES +55 (key) override -+02 CURRENT +57 FUTURE USES -+04 HERE +59 blk's variables -+06 C -+32 IN(* -+34 FUTURE USES -+4e INTJUMP -+51 CURRENTPTR -+53 (emit) override +RAMSTART FUTURE USES +3c BLK(* ++02 CURRENT +3e FUTURE USES ++04 HERE +4e INTJUMP ++06 C +5f FUTURE USES ++32 IN(* +70 DRIVERS ++34 BLK@* +80 RAMEND ++36 BLK!* ++38 BLK> ++3a BLKDTY (cont.) diff --git a/blk/084 b/blk/084 index ef7b8a5..e3e575e 100644 --- a/blk/084 +++ b/blk/084 @@ -7,10 +7,9 @@ for example), it can point elsewhere. NLPTR points to an alternative routine for NL (by default, CRLF). +BLK* see B416. + FUTURE USES section is unused for now. -DRIVERS section is reserved for recipe-specific -drivers. Here is a list of known usages: - -* 0x70-0x78: ACIA buffer pointers in RC2014 recipes. +DRIVERS section is reserved for recipe-specific drivers. diff --git a/blk/416 b/blk/416 index a7f9e3a..be477fb 100644 --- a/blk/416 +++ b/blk/416 @@ -1,13 +1,12 @@ -: BLKMEM+ 0x59 RAM+ @ + ; ( n -- Fetches block n and write it to BLK( ) -: BLK@* 0 BLKMEM+ ; +: BLK@* 0x34 RAM+ ; ( n -- Write back BLK( to storage at block n ) -: BLK!* 2 BLKMEM+ ; +: BLK!* 0x36 RAM+ ; ( Current blk pointer in ( ) -: BLK> 4 BLKMEM+ ; +: BLK> 0x38 RAM+ ; ( Whether buffer is dirty ) -: BLKDTY 6 BLKMEM+ ; -: BLK( 8 BLKMEM+ ; +: BLKDTY 0x3a RAM+ ; +: BLK( 0x3c RAM+ @ ; : BLK) BLK( 1024 + ; diff --git a/blk/417 b/blk/417 index 2ba2b0a..931cc51 100644 --- a/blk/417 +++ b/blk/417 @@ -1,7 +1,6 @@ : BLK$ - H@ 0x59 RAM+ ! - ( 1024 for the block, 8 for variables ) - 1032 ALLOT + H@ 0x3c ( BLK(* ) RAM+ ! + 1024 ALLOT ( LOAD detects end of block with ASCII EOT. This is why we write it there. EOT == 0x04 ) 4 C, diff --git a/emul/forth.bin b/emul/forth.bin index 5c5449db1a1da8c69e225a42aadbbd762d30dfd2..3b9e659d9fc99fad8a30e795b3e5487c0a8213a7 100644 GIT binary patch delta 1136 zcmZWoO=uHA6n>kTrft%l-AS@R5$)!Onz$ON*rKIs-NsTdsije{7!ZGpXe0hyM1$3X z;2{znr1ap?Ln|IUSQNoaJ$R_vyMkzYupk~p)PoY=+qGUi?6B{f@4fln-~HU3T7Vz(7gie)PW;m+lrmvKWab_k)9PK<1>2E zt}!o2)b*)+kx;HaJZ*?^gfC7Cpr(1OE5SFL9hZYkX>aVFN7a9(Sgph-fJ#oPK=+r zsN%xaifUAB#`C7=)SA^Z(NU<25-c^)sg!~MrrH8^;X+{`>{%ht>L2kf{jXIRpfdar z%g8JZ_lJO?qYZVn$!L!^8~EVa)7f^U#Ec}IJq?dVQXMrmvd1E(ZX5a3lrh7HT3yH` zC0rNJj5IR3(cbOu8`+Q84e>_(G)6OZF~_^uSAz#^*beLdrAwMWqvl;X&_s=Os!Qh1 z!Ev)L=)G6hM$c2%7VW@W<&IZvRGLE^l z0XoSqAqsyeQdHBC4t-pfWtutRYcdU2)Vs)f)Yz$l(bS%K9Cg#H+y}P67b8^3KKQ`8 zSW&ky9$6OF=qX|p|94~zrCWjHVTw<6{nSXRO0-wYs|V3;%~2ntsnonqE0psVCJob3 zN{*IimfJYu^jA@tm~(7iFX8L2u^j&WYj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