From 4543fd0ef6e16249d449fcaeff1cbd758c4c0f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 10 Oct 2010 20:41:41 +0000 Subject: [PATCH] Define the needed Library Vector Offsets in the header and use them from the asm. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38943 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../boot/platform/amiga_m68k/amicalls.h | 27 ++++++++++++++++--- src/system/boot/platform/amiga_m68k/shell.S | 19 ++++--------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/system/boot/platform/amiga_m68k/amicalls.h b/src/system/boot/platform/amiga_m68k/amicalls.h index 432d976373..cef75268d1 100644 --- a/src/system/boot/platform/amiga_m68k/amicalls.h +++ b/src/system/boot/platform/amiga_m68k/amicalls.h @@ -1035,18 +1035,36 @@ struct Library; #define EXEC_BASE_NAME SysBase +#define _LVOFindResident (-0x60) +#define _LVOAllocAbs (-0xcc) +#define _LVOOldOpenLibrary (-0x198) +#define _LVOCloseLibrary (-0x19e) +#define _LVODoIO (-0x1c8) +#define _LVOOpenLibrary (-0x228) + + #ifndef __ASSEMBLER__ extern Library *EXEC_BASE_NAME; +#define AllocAbs(par1, last) \ + LP2(0xcc, APTR, AllocAbs, unsigned long, par1, d0, APTR, last, a1, \ + , EXEC_BASE_NAME) + #define CloseLibrary(last) \ LP1NR(0x19e, CloseLibrary, struct Library *, last, a1, \ , EXEC_BASE_NAME) -#define OpenLibrary(par1, last) \ - LP2(0x228, struct Library *, OpenLibrary, uint8 *, par1, a1, unsigned long, last, d0, \ +#define DoIO(last) \ + LP1(0x1c8, BYTE, DoIO, struct IORequest *, last, a1, \ , EXEC_BASE_NAME) +#define OpenLibrary(par1, last) \ + LP2(0x228, struct Library *, OpenLibrary, uint8 *, par1, a1, \ + unsigned long, last, d0, \ + , EXEC_BASE_NAME) + + extern "C" status_t exec_error(int32 err); @@ -1066,12 +1084,15 @@ extern "C" status_t exec_error(int32 err); #define INTUITION_BASE_NAME IntuitionBase +#define _LVODisplayAlert (-0x5a) + #ifndef __ASSEMBLER__ extern Library *INTUITION_BASE_NAME; #define DisplayAlert(par1, par2, last) \ - LP3(0x5a, bool, DisplayAlert, unsigned long, par1, d0, void *, par2, a0, unsigned long, last, d1, \ + LP3(0x5a, bool, DisplayAlert, unsigned long, par1, d0, void *, \ + par2, a0, unsigned long, last, d1, \ , INTUITION_BASE_NAME) #endif /* __ASSEMBLER__ */ diff --git a/src/system/boot/platform/amiga_m68k/shell.S b/src/system/boot/platform/amiga_m68k/shell.S index 902e0200ab..3382a620f3 100644 --- a/src/system/boot/platform/amiga_m68k/shell.S +++ b/src/system/boot/platform/amiga_m68k/shell.S @@ -39,15 +39,6 @@ #include "amiga_memory_map.h" #include "amicalls.h" -// AmigaDOS calls -// exec.library -#define _FindResident -0x60 -#define _OldOpenLibrary -0x198 -#define _CloseLibrary -0x19e -// intuition.library -#define _DisplayAlert -90 - - // 1 enabled verbose output //#define DEBUG 1 @@ -85,21 +76,21 @@ floppy_start: // seems like a6 is already set to ExecBase when called from the ROM ? move.l 4.w,%a6 // exec base - //jsr _FindResident(%a6) + //jsr _LVOFindResident(%a6) lea SysBase(%pc),%a2 move.l %a6,(%a2) // lea dosname_boot(%pc),%a1 // move.l 4.w,%a6 // exec base -// jsr _FindResident(%a6) +// jsr _LVOFindResident(%a6) // lea DosBase(%pc),%a2 // tst.l %d0 // beq.s _floppy_err // move.l %d0,(%a2) lea intname_boot(%pc),%a1 - jsr _OldOpenLibrary(%a6) + jsr _LVOOldOpenLibrary(%a6) tst.l %d0 beq.s _floppy_err lea IntuitionBase(%pc),%a2 @@ -116,7 +107,7 @@ floppy_start: //_continue: // lea dosname_boot(%pc),%a1 // move.l 4.w,%a6 // exec base -// jsr _FindResident(%a6) +// jsr _LVOFindResident(%a6) // lea _dosbase(%pc),%a2 // tst.l %d0 // beq.s _floppy_err @@ -142,7 +133,7 @@ _display_alert: lea alert_data(%pc),%a0 moveq #0,%d0 move.l #40,%d1 - jsr _DisplayAlert(%a6) + jsr _LVODisplayAlert(%a6) //move.l (%sp)+,%a6 rts