J'ai ce code dans ma lib:
;========================================================== ; GetCurrentArgPtr ; ; Return a ptr to the current arg ; ; input a0 CMDLINE* ; output a0 Arg ; destroy d0/a0 ;========================================================== butillib@0009: move.w ARGIT(a0),d0 movea.l ARGV(a0),a0 movea.l 0(a0,d0.w),a0 rts ;========================================================== ; IsArgSwitch ; ; Return 0 if the current arg is not a switch (ie if it doesn't begin with +/-) ; ; input a0 CMDLINE* ; output d0.b 0 if the arg is not a switch ; destroy d0/a0 ;========================================================== butillib@0003: bsr butillib@0009 moveq.l #'-',d0 cmp.b (a0),d0 beq.s \Switch cmpi.b #'+',(a0) seq.b d0 \Switch: rts
A68k m'assemble le "bsr butillib@0009" en "bsr butillib@0000". Pourtant, kernel::LibsPtr me renvoie un pointeur correct vers cette fonction, donc la table d'export est correcte. Le workaround est évident, mais j'aimerais comprendre pourquoi ça ne marche pas... Le problème est identique si j'écris "bsr butillib::GetCurrentArgPtr