1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-06 03:20:56 +11:00
collapseos/blk/611

17 lines
569 B
Plaintext

: SDC$
10 0 DO _idle DROP LOOP
0 ( dummy ) 10 0 DO ( r )
DROP 0x40 0 0 SDCMDR1 ( CMD0 )
DUP 0x01 = IF LEAVE THEN
LOOP 0x01 = NOT IF _err THEN
0x48 0 0x1aa ( CMD8 ) SDCMDR7 ( r arg1 arg2 )
0x1aa = NOT IF _err THEN ( arg2 check )
0 = NOT IF _err THEN ( arg1 check )
0x01 = NOT IF _err THEN ( r check )
BEGIN
0x77 0 0 SDCMDR1 ( CMD55 )
0x01 = NOT IF _err THEN
0x69 0x4000 0x0000 SDCMDR1 ( CMD41 )
DUP 0x01 > IF _err THEN
NOT UNTIL ; ( out of idle mode, success! )