2019-05-07 15:26:52 -04:00
|
|
|
#include "jumptable.inc"
|
|
|
|
.org 0x9000
|
|
|
|
|
2019-05-08 16:03:54 -04:00
|
|
|
call JUMP_SDCINITALIZE
|
|
|
|
or a
|
2019-05-07 17:28:07 -04:00
|
|
|
jp nz, .error
|
|
|
|
|
2019-05-08 20:08:17 -04:00
|
|
|
ld hl, sOk
|
|
|
|
call JUMP_PRINTSTR
|
2019-05-07 17:28:07 -04:00
|
|
|
|
2019-05-08 20:08:17 -04:00
|
|
|
call JUMP_SDCSETBLKSIZE
|
|
|
|
or a
|
|
|
|
jp nz, .error
|
2019-05-07 17:28:07 -04:00
|
|
|
|
2019-05-08 20:08:17 -04:00
|
|
|
ld hl, sOk
|
2019-05-07 17:28:07 -04:00
|
|
|
call JUMP_PRINTSTR
|
|
|
|
|
2019-05-08 20:08:17 -04:00
|
|
|
; read sector 0
|
|
|
|
xor a
|
|
|
|
call JUMP_SDCREAD
|
|
|
|
or a
|
|
|
|
jp nz, .error
|
2019-05-07 17:28:07 -04:00
|
|
|
|
2019-05-08 20:08:17 -04:00
|
|
|
push hl
|
|
|
|
ld hl, sOk
|
2019-05-07 17:28:07 -04:00
|
|
|
call JUMP_PRINTSTR
|
2019-05-08 20:08:17 -04:00
|
|
|
pop hl
|
|
|
|
; SDC buffer address is in HL
|
|
|
|
; YOLO! print it!
|
2019-05-07 17:28:07 -04:00
|
|
|
call JUMP_PRINTSTR
|
2019-05-08 20:08:17 -04:00
|
|
|
|
2019-05-07 16:20:28 -04:00
|
|
|
ret
|
|
|
|
.error:
|
2019-05-07 17:28:07 -04:00
|
|
|
call JUMP_PRINTHEX
|
2019-05-07 16:20:28 -04:00
|
|
|
ld hl, sErr
|
|
|
|
call JUMP_PRINTSTR
|
2019-05-07 15:26:52 -04:00
|
|
|
ret
|
2019-05-07 16:20:28 -04:00
|
|
|
|
|
|
|
sOk:
|
|
|
|
.db "Ok", 0xa, 0xd, 0
|
|
|
|
sErr:
|
|
|
|
.db "Err", 0xa, 0xd, 0
|