Adjust stack when jumping to bootsector to avoid IO space

This commit is contained in:
pjht 2023-03-24 08:04:53 -05:00
parent bea0c3979f
commit 5a0f1c7e46
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -22,8 +22,12 @@ romfindret:
jmp (a6) | Jump to the ramcode jmp (a6) | Jump to the ramcode
ramcode: ramcode:
move.b #0x0, (0xF2, a6) | Disable the ROM move.b #0x0, (0xF3, a6) | Disable the ROM
move.l #0x1, (a5) | Enable the RAM at base 0x0 move.l #0x1, (a5) | Enable the RAM at base 0x0
cmpi.l #0x1000000, d7
blt.b sp_ok
move.l #0xff0000, d7
sp_ok:
move.l d7, a7 move.l d7, a7
| Load sector 0 to 0x0 | Load sector 0 to 0x0
move.l #0x0, (0x0, a4) | Set the sector number to 0 move.l #0x0, (0x0, a4) | Set the sector number to 0