From 6a5ff3adcbc3203aa5641875e3a3b4f94308c036 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 12 May 2020 21:48:29 -0400 Subject: [PATCH] rc2014: unify SD Card driver Now more low/high layers. --- blk/370 | 3 +-- blk/372 | 2 -- blk/391 | 4 ++-- blk/412 | 1 + blk/435 | 2 +- recipes/rc2014/sdcard/README.md | 7 +++---- recipes/rc2014/xcomp.fs | 2 +- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/blk/370 b/blk/370 index 9418293..0a31674 100644 --- a/blk/370 +++ b/blk/370 @@ -1,4 +1,3 @@ SD Card driver -Load the z80 part with "372 LOAD", the Forth part with -"374 LOAD". +Load range: 372-381 diff --git a/blk/372 b/blk/372 index c4ce3fd..24d54e0 100644 --- a/blk/372 +++ b/blk/372 @@ -10,5 +10,3 @@ CODE _sdcSR ( n -- n ) L A LDrr, HL PUSHqq, ;CODE - -373 LOAD diff --git a/blk/391 b/blk/391 index f76c157..d1e0f66 100644 --- a/blk/391 +++ b/blk/391 @@ -9,8 +9,8 @@ unusable directly. For the same reason, any reference to a word in the host system will obviously be wrong in the target system. More details in B260. -These rules result in some practicals do's and dont's: -1. No LEAVE in DO..LOOP + + (cont.) diff --git a/blk/412 b/blk/412 index f6196f1..11f255d 100644 --- a/blk/412 +++ b/blk/412 @@ -13,3 +13,4 @@ : ALLOT HERE +! ; : CREATE (entry) 11 ( 11 == cellWord ) C, ; +: LEAVE R> R> DROP I 1- >R >R ; diff --git a/blk/435 b/blk/435 index 5b89d16..415ab82 100644 --- a/blk/435 +++ b/blk/435 @@ -5,4 +5,4 @@ variables are sent to PS at runtime ) : DO COMPILE 2>R H@ ; IMMEDIATE : LOOP COMPILE (loop) H@ - , ; IMMEDIATE -: LEAVE R> R> DROP I 1- >R >R ; +( LEAVE is implemented in xcomp ) diff --git a/recipes/rc2014/sdcard/README.md b/recipes/rc2014/sdcard/README.md index 6178c05..3bc3838 100644 --- a/recipes/rc2014/sdcard/README.md +++ b/recipes/rc2014/sdcard/README.md @@ -72,10 +72,9 @@ instead. ## Building your stage 3 Using the same technique as you used in the `eeprom` recipe, you can append -required words to your boot binary. Required units `blk` (B464) and the SD Card -driver (B370). You only need the Forth part. You of course actually need -Z80 SDC words but to save you the troubles of rebuilding from stage 1 for this -recipe, we took the liberty of already having included it in the base recipe. +required words to your boot binary. There's only one required unit: `blk` from +core words (B453). The SD card driver was already included in the base recipe +to save you the troubles of rebuilding from stage 1 for this recipe. ## Testing in the emulator diff --git a/recipes/rc2014/xcomp.fs b/recipes/rc2014/xcomp.fs index 30590a1..f2af298 100644 --- a/recipes/rc2014/xcomp.fs +++ b/recipes/rc2014/xcomp.fs @@ -22,7 +22,7 @@ CURRENT @ XCURRENT ! 282 LOAD ( boot.z80 ) 393 LOAD ( icore low ) 352 LOAD ( acia ) -372 LOAD ( sdc.z80 ) +372 381 LOADR ( sdc ) 415 LOAD ( icore high ) (entry) _ ( Update LATEST )