1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 19:18:06 +11:00
collapseos/blk/374
Virgil Dupras c494917452 blk: Add LOAD+ and LOADR+
And use them in all places they make sense.
2020-05-04 21:43:48 -04:00

17 lines
319 B
Plaintext

( -- n )
: _idle 0xff _sdcSR ;
( -- n )
( _sdcSR 0xff until the response is something else than 0xff
for a maximum of 20 times. Returns 0xff if no response. )
: _wait
0 ( cnt )
BEGIN
_idle
DUP 0xff = IF DROP ELSE SWAP DROP EXIT THEN
1+
DUP 20 = UNTIL
DROP 0xff
;
1 12 LOADR+