Mail Archives: djgpp/2000/04/17/07:51:36
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 -