Mail Archives: djgpp/2000/04/17/07:51:36

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: djgpp equivalent of borland __emi__ function
Date: 17 Apr 2000 11:36:17 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 18
Message-ID: <8desvh$ilo$1@nets3.rz.RWTH-Aachen.DE>
References: <34AK4.1308$Uy5 DOT 1641536 AT nnrp6 DOT proxad DOT net>
X-Trace: nets3.rz.RWTH-Aachen.DE 955971377 19128 (17 Apr 2000 11:36:17 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 17 Apr 2000 11:36:17 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Alexandre Devaure <Alexandre DOT Devaure AT leroy-autom DOT com> wrote:
> Hi
> I need to port Borland c code to djgpp. But in the code sources, the coder
> used the __emit__ function. This function puts opcode directly in the text
> segment. Does it exist an equivalent function with djgpp ?

The closest equivalent would be an inline assembly statement. If my
guess that __emit__ outputs not via an assembly mnemonic, but directly
by hexcode, you can use '.byte 0xab' syntax. See sys/farptr.h for
examples (the segment overrides are code like that, there).  OTOH,
chances are that recent binutils even support your opcodes as
mnemonics, removing the need for machine code.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -

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