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.
This commit is contained in:
Byron Lathi
2022-04-18 20:25:08 -05:00
parent 54328722ab
commit 9dd460a47f
10 changed files with 129 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
.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