rc2014: unify SD Card driver
Now more low/high layers.
This commit is contained in:
parent
cbf5baf3b6
commit
6a5ff3adcb
3
blk/370
3
blk/370
@ -1,4 +1,3 @@
|
|||||||
SD Card driver
|
SD Card driver
|
||||||
|
|
||||||
Load the z80 part with "372 LOAD", the Forth part with
|
Load range: 372-381
|
||||||
"374 LOAD".
|
|
||||||
|
2
blk/372
2
blk/372
@ -10,5 +10,3 @@ CODE _sdcSR ( n -- n )
|
|||||||
L A LDrr,
|
L A LDrr,
|
||||||
HL PUSHqq,
|
HL PUSHqq,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
373 LOAD
|
|
||||||
|
4
blk/391
4
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
|
in the host system will obviously be wrong in the target
|
||||||
system. More details in B260.
|
system. More details in B260.
|
||||||
|
|
||||||
These rules result in some practicals do's and dont's:
|
|
||||||
|
|
||||||
1. No LEAVE in DO..LOOP
|
|
||||||
|
|
||||||
|
|
||||||
(cont.)
|
(cont.)
|
||||||
|
1
blk/412
1
blk/412
@ -13,3 +13,4 @@
|
|||||||
|
|
||||||
: ALLOT HERE +! ;
|
: ALLOT HERE +! ;
|
||||||
: CREATE (entry) 11 ( 11 == cellWord ) C, ;
|
: CREATE (entry) 11 ( 11 == cellWord ) C, ;
|
||||||
|
: LEAVE R> R> DROP I 1- >R >R ;
|
||||||
|
2
blk/435
2
blk/435
@ -5,4 +5,4 @@
|
|||||||
variables are sent to PS at runtime )
|
variables are sent to PS at runtime )
|
||||||
: DO COMPILE 2>R H@ ; IMMEDIATE
|
: DO COMPILE 2>R H@ ; IMMEDIATE
|
||||||
: LOOP COMPILE (loop) H@ - , ; IMMEDIATE
|
: LOOP COMPILE (loop) H@ - , ; IMMEDIATE
|
||||||
: LEAVE R> R> DROP I 1- >R >R ;
|
( LEAVE is implemented in xcomp )
|
||||||
|
@ -72,10 +72,9 @@ instead.
|
|||||||
## Building your stage 3
|
## Building your stage 3
|
||||||
|
|
||||||
Using the same technique as you used in the `eeprom` recipe, you can append
|
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
|
required words to your boot binary. There's only one required unit: `blk` from
|
||||||
driver (B370). You only need the Forth part. You of course actually need
|
core words (B453). The SD card driver was already included in the base recipe
|
||||||
Z80 SDC words but to save you the troubles of rebuilding from stage 1 for this
|
to save you the troubles of rebuilding from stage 1 for this recipe.
|
||||||
recipe, we took the liberty of already having included it in the base recipe.
|
|
||||||
|
|
||||||
## Testing in the emulator
|
## Testing in the emulator
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ CURRENT @ XCURRENT !
|
|||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore low )
|
||||||
352 LOAD ( acia )
|
352 LOAD ( acia )
|
||||||
372 LOAD ( sdc.z80 )
|
372 381 LOADR ( sdc )
|
||||||
415 LOAD ( icore high )
|
415 LOAD ( icore high )
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
|
Loading…
Reference in New Issue
Block a user