Files
super6502/sw/bootloader/bios_calls.s
Byron Lathi 9dd460a47f Add preliminary bootloader
This bootloader right now just prints the letter A, but should be
capable of reading blocks from the SD card into memory.
2022-04-18 20:25:08 -05:00

23 lines
400 B
ArmAsm

.export _sd_readblock
.autoimport
.importzp sreg
; sreg is the pointer to store the data
; a/y is the block address
; send command 17 with the block address of 00/y/a
; void sd_readblock(uint16_t addr, void* buf);
_sd_readblock:
sta sreg ; move buf pointer to sreg
stx sreg+1
jsr popax ; move addr to a/y
tya
ldx #$1 ; call interrupt 1
brk
rts