Mail Archives: djgpp/1996/11/25/20:45:26
Alaric B. Williams wrote:
>
> Petteri DOT Kangaslampi AT research DOT nokia DOT com (Petteri Kangaslampi) wrote:
> >Also, I know that one piece of code gets transformed wrong. If you have a
> >pointer to a function in a variable, and want to call that, the resulting AT&T
> >assembler code just tries to call the address of the variable. So in effect
>
> > call [dword pointer]
> >gets replaced by
> > call pointer
>
...
> So how /do/ you do it?
>
> call pointer
> call (pointer)
Try '(l)call pointer(,1) or (l)jmp pointer(,1)` to jump to the address
that 'pointer'
holds. This workaround is rather ugly, but it works for me.
IMHO, the AT&T syntax is inconsequently here - to jump to function, it
should be
'call $_foo' instead of 'call _foo'
Matthias Grimrath
- Raw text -