etherforth_logo

Node 705

MMC controller node.

Source code

mmc node 706 node 704 node 705
705 mmc
host do, ce-, clk
+-- 1557A lit ; +-+ 1557B lit ;
++- 1557E lit ; +++ 1557F lit ; target
CA org half C2 org 8obits C7 org ibit 0 org

mmc 00 79 dup push dup
off 02 begin ++- half +++ half next ;
cs- 08 7 push off ;
go 0B 1F5 r-l- a! 12039 go ! a push ;
start 0F ! start r--- ;
wout 11 dw-d 8obits bout 12 dw-d 8obits drop ;
dat! 14 dn-d push 3FFF8 ncr+tok wout
begin @ bout next 128 for dup wout next ;
rbit 1D dw-dw +-- half +-+ half ;
bin 21 d-db dup dup or 7 for rbit ibit - next ;
r1 28 d-d dup begin drop bin FF or until FF or ! ;
tok 2E d-d dup begin drop bin FE or if swap end then drop ;
dat@ 34 dn-d push tok begin bin ! next 257 for bin drop next ;
bsy 3C d-d dup begin drop bin until ! ; 40

init right a! io b! start ; 44
3 l 0 u 0 ether

Definitions

mmc
.
off
.
cs-
.
go
.
start
.
wout, bout
.
dat!
.
rbit
.
bin
.
r1
.
tok
.
dat@
.
bsy
.
init
Set registers A and B, and jump to start.

Description