Si c'est
PedroM, tu peux faire ça:
.section .text.PedroMsmallmenu,"x"
| short PedroMsmallmenu(unsigned short x asm("d0"),unsigned short y asm("d1"),
| unsigned short nbitem asm("d2"),char *txtlist asm("a0"),void *ptr asm("a1"));
PedroMsmallmenu:
| Search for RAM_CALL table
0: addq.l #2,%a1
cmp.l #0x4c00,(%a1)
bne.s 0b
| Get kernel::LibsExec
movea.l (0x1d-0x21)*4(%a1),%a1
| Call userlib::smallmenu through kernel::LibsExec
move.l #0x000c0000,-(%a7)
pea.l L.userlib(%pc)
jsr (%a1)
addq.l #8,%a7
| Check if an item was selected
tst.w %d2
beq.s 1f
clr.w %d0
1: rts
L.userlib: .asciz "userlib"
short PedroMsmallmenu(unsigned short x asm("d0"),unsigned short y asm("d1"),
unsigned short nbitem asm("d2"),char *txtlist asm("a0"),void *ptr asm("a1"));
#define SmallMenu(x,y,n,t) (PedroMsmallmenu((x),(y),(n),(t),ROM_base+0x1A000))
Ça marche même en
_nostub (mais évidemment seulement sous PedroM).
(Et évidemment il ne faut pas utiliser de
RAM_CALL pour
ROM_base, le fameux
(*(unsigned long *)0xc8)&0xE00000uL fonctionne très bien.

)