1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 21:38:05 +11:00
collapseos/blk/432
2020-10-29 21:03:11 -04:00

17 lines
504 B
Plaintext

: _ ( dstaddr blkno -- )
[ SDC_DEVID LITN ] (spie)
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 )
_idle ( crc a n )
DUP ROT C!+ ( crc n a+1 )
ROT> _crc16 ( a+1 crc )
SWAP ( crc a+1 )
LOOP
DROP ( crc1 )
_idle 8 LSHIFT _idle + ( crc2 )
_wait DROP 0 (spie)
= NOT IF _err THEN ;