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:
26
sw/bootloader/boot.s
Normal file
26
sw/bootloader/boot.s
Normal file
@@ -0,0 +1,26 @@
|
||||
; We need to to read the boot sector from the
|
||||
; SD card, verify the last 2 bytes, then jump to the
|
||||
; beginning of it.
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
.import _load_bootsect
|
||||
|
||||
.export _init, _boot
|
||||
|
||||
.segment "STARTUP"
|
||||
|
||||
_init: jmp _boot
|
||||
|
||||
.segment "CODE"
|
||||
|
||||
_boot: ldx #$ff
|
||||
txs
|
||||
cld
|
||||
|
||||
jsr _load_bootsect
|
||||
jmp $1000
|
||||
|
||||
.segment "SIGN"
|
||||
.byte $55
|
||||
.byte $aa
|
||||
Reference in New Issue
Block a user