1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 22:38:06 +11:00
collapseos/blk/612
Virgil Dupras f6ded7712e VE: add 't'
This is the first commit I do entirely in VE. It's a habit I'm planning
on taking as it helps a lot to find usability issues.
2020-06-11 18:12:01 -04:00

17 lines
486 B
Plaintext

: _sdc@ ( dstaddr blkno -- )
_sdcSel 0x51 ( CMD17 ) 0 ROT ( a cmd 0 blkno ) _cmd
IF _err THEN
_wait 0xfe = NOT IF _err THEN
0 SWAP ( crc a )
512 0 DO ( crc a )
DUP _idle ( crc a a n )
DUP ROT C! ( crc a n )
ROT SWAP _crc16 ( a crc )
SWAP 1+ ( crc a+1 )
LOOP
DROP ( crc1 )
_idle 8 LSHIFT _idle + ( crc2 )
_wait DROP _sdcDesel
= NOT IF _err THEN ;