1
0
mirror of https://frontier.innolan.net/github/AmigaExamples.git synced 2025-11-21 11:01:40 +00:00
Files
AmigaExamples/shared/bootblock.s
2016-03-14 13:45:54 +11:00

37 lines
737 B
ArmAsm

include exec/io.i
include lvo/exec_lib.i
include devices/trackdisk.i
bootblock:
dc.b "DOS",0
dc.l 0
dc.l 880
bootEntry:
;; a6 = Exec base
;; a1 = trackdisk.device I/O request pointer
lea BASE_ADDRESS,a5 ; main.s entry point
;; move.l #$ff000,a7
;; Load the progam from the floppy using trackdisk.device
move.l #mainEnd-mainStart,IO_LENGTH(a1)
move.l a5,IO_DATA(a1)
move.l #mainStart-bootblock,IO_OFFSET(a1)
jsr _LVODoIO(a6)
;; Turn off drive motor
move.l #0,IO_LENGTH(a1)
move.w #TD_MOTOR,IO_COMMAND(a1)
jsr _LVODoIO(a6)
jmp (a5) ; -> main.s entry point
;; Pad the remainder of the bootblock
cnop 0,1024
mainStart:
incbin "out/main.bin"
cnop 0,512
mainEnd:
end