4f1ccb7da9261e9e4ccb987781d4325d57f1a87a
[lugburz] / boot.s
1 | vi:filetype=gas68k:
2         .equ CMD_READ, 2
3         .equ EXEC_DO_IO, -0x1c8
4         .equ LOADADDR,  0x10000
5
6 start:
7 | starting with trackdisk device I/O request pointer in a1
8 | load the program at 0x100 and jump there
9 | program length is patched by mk_adf just before start
10         move.l -6(%pc), %d0             | get program size
11         move.w #0x080, 0xdff180
12         move.l %d0, 0x24(%a1)           | I/O length
13         move.l #LOADADDR, 0x28(%a1)     | I/O data pointer
14         move.l #512, 0x2c(%a1)          | I/O offset (skip first sector)
15         move.w #CMD_READ, 0x1c(%a1)     | I/O command
16         jsr EXEC_DO_IO(%a6)
17         move.w #0xf0f, 0xdff180
18
19         jmp LOADADDR
20         .align 4