1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-27 18:28:06 +11:00
collapseos/blk/432

17 lines
504 B
Plaintext
Raw Normal View History

2020-10-30 12:03:11 +11:00
: _ ( dstaddr blkno -- )
[ SDC_DEVID LITN ] (spie)
0x51 ( CMD17 ) 0 ROT ( a cmd 0 blkno ) _cmd
2020-04-24 03:55:00 +10:00
IF _err THEN
_wait 0xfe = NOT IF _err THEN
0 SWAP ( crc a )
512 0 DO ( crc a )
2020-10-30 12:03:11 +11:00
_idle ( crc a n )
DUP ROT C!+ ( crc n a+1 )
ROT> _crc16 ( a+1 crc )
SWAP ( crc a+1 )
2020-04-24 03:55:00 +10:00
LOOP
DROP ( crc1 )
2020-05-08 05:40:10 +10:00
_idle 8 LSHIFT _idle + ( crc2 )
_wait DROP 0 (spie)
2020-04-24 03:55:00 +10:00
= NOT IF _err THEN ;