The boot environment will read the boot sector from the sd card, verify that it has the boot signature at the end, then jump to the start of it. From there, there should be a bootloader written to the boot segment that can handle the rest. It might be tight to fit everything into the boot sector but do remember that you do not have to initialize or select the sd card, and those functions take up a lot of space.
17 lines
283 B
ArmAsm
17 lines
283 B
ArmAsm
; 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"
|
|
|
|
.segment "STARTUP"
|
|
|
|
.import _load_bootsect
|
|
|
|
_init: ldx #$ff
|
|
txs
|
|
cld
|
|
|
|
jsr _load_bootsect
|
|
jmp $1000
|
|
|