www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/25/20:45:26

From: Matthias Grimrath <y0001032 AT ws DOT rz DOT tu-bs DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Is there O2S like OBJ2ASM?
Date: Mon, 25 Nov 1996 17:02:46 +0100
Organization: TU-Braunschweig, Rechenzentrum
Lines: 26
Distribution: world
Message-ID: <3299C326.7ED8@ws.rz.tu-bs.de>
References: <Pine DOT LNX DOT 3 DOT 91 DOT 961115151041 DOT 402B-100000 AT hostr DOT bielbit DOT bielsko DOT pl> <5701pm$hkv AT hauva DOT research DOT nokia DOT com> <848688769 DOT 22596 DOT 0 AT abwillms DOT demon DOT co DOT uk>
NNTP-Posting-Host: rzbcosv1.rz.tu-bs.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019