amiga_boottest
diff src/boot/boot.s @ 1:48093e4bd99a
stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Feb 2018 18:00:45 +0200 |
parents | 51422ea54b9d |
children | 58ebd84822e7 |
line diff
1.1 --- a/src/boot/boot.s Wed Feb 21 12:00:13 2018 +0200 1.2 +++ b/src/boot/boot.s Wed Feb 21 18:00:45 2018 +0200 1.3 @@ -1,24 +1,20 @@ 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 +| load the program at 0x100 and jump there 1.14 +| program length is patched by mk_adf just before start 1.15 start: 1.16 + move.l -6(%pc), %d0 | get binary size 1.17 + move.l %d0, 0x24(%a1) | I/O length 1.18 move.l #0x100, 0x28(%a1) | I/O data pointer 1.19 - move.l start - 4, 0x24(%a1) | I/O length (1 sector for now) 1.20 move.l #512, 0x2c(%a1) | I/O offset (skip first sector) 1.21 move.w #CMD_READ, 0x1c(%a1) | I/O command 1.22 move.l %a1, -(%sp) 1.23 jsr EXEC_DO_IO(%a6) 1.24 move.l (%sp)+, %a1 1.25 - move.b 0x1f(%a1), %d0 1.26 1.27 - move.l #0x100, %a0 1.28 - rts 1.29 - 1.30 - .ascii "bootblock_end" 1.31 + bra 0x100 1.32 .align 4