amiga_boottest
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/boot/boot.s Wed Feb 21 12:00:13 2018 +0200 1.3 @@ -0,0 +1,24 @@ 1.4 +| vi:filetype=gas68k: 1.5 + 1.6 + .equ CMD_READ, 2 1.7 + 1.8 + .equ EXEC_DO_IO, -0x1c8 1.9 + 1.10 +| starting with trackdisk device I/O request pointer in a1 1.11 +| load the program at 0x100 and return with that value in a0 1.12 +| program length is patched by mk_adf at start - 4 1.13 +start: 1.14 + move.l #0x100, 0x28(%a1) | I/O data pointer 1.15 + move.l start - 4, 0x24(%a1) | I/O length (1 sector for now) 1.16 + move.l #512, 0x2c(%a1) | I/O offset (skip first sector) 1.17 + move.w #CMD_READ, 0x1c(%a1) | I/O command 1.18 + move.l %a1, -(%sp) 1.19 + jsr EXEC_DO_IO(%a6) 1.20 + move.l (%sp)+, %a1 1.21 + move.b 0x1f(%a1), %d0 1.22 + 1.23 + move.l #0x100, %a0 1.24 + rts 1.25 + 1.26 + .ascii "bootblock_end" 1.27 + .align 4