amiga_boottest

view src/boot/boot.s @ 0:51422ea54b9d

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 21 Feb 2018 12:00:13 +0200
parents
children 48093e4bd99a
line source
1 | vi:filetype=gas68k:
3 .equ CMD_READ, 2
5 .equ EXEC_DO_IO, -0x1c8
7 | starting with trackdisk device I/O request pointer in a1
8 | load the program at 0x100 and return with that value in a0
9 | program length is patched by mk_adf at start - 4
10 start:
11 move.l #0x100, 0x28(%a1) | I/O data pointer
12 move.l start - 4, 0x24(%a1) | I/O length (1 sector for now)
13 move.l #512, 0x2c(%a1) | I/O offset (skip first sector)
14 move.w #CMD_READ, 0x1c(%a1) | I/O command
15 move.l %a1, -(%sp)
16 jsr EXEC_DO_IO(%a6)
17 move.l (%sp)+, %a1
18 move.b 0x1f(%a1), %d0
20 move.l #0x100, %a0
21 rts
23 .ascii "bootblock_end"
24 .align 4