collapseos/blk/434

17 lines
504 B
Plaintext
Raw Normal View History

2020-04-23 13:55:00 -04:00
: _sdc! ( srcaddr blkno -- )
[ SDC_DEVID LITN ] (spie)
0x58 ( CMD24 ) 0 ROT ( a cmd 0 blkno ) _cmd
2020-04-23 13:55:00 -04:00
IF _err THEN
_idle DROP 0xfe (spix) DROP 0 SWAP ( crc a )
2020-04-23 13:55:00 -04:00
512 0 DO ( crc a )
C@+ ( crc a+1 n )
ROT OVER ( a n crc n )
_crc16 ( a n crc )
SWAP ( a crc n )
(spix) DROP ( a crc )
2020-04-23 13:55:00 -04:00
SWAP ( crc a )
LOOP
DROP ( crc ) 256 /MOD ( lsb msb )
(spix) DROP (spix) DROP
_wait DROP 0 (spie) ;