www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - "org" directive

Hello.  I am compiling a DOS real-mode, small memory model object file which I
want to "overwrite" another object file during linking.  That is, I have
another object module that I assembled, I have set the code segment to be
combine type "COMMON," and I want to essentially patch over that object file,
which has a lot of code, with an individual function that I am compiling from
DMC.  (The .c file uses extern delcarations to variables defined in the
assembly file DGROUP.)

I was wondering if there is some sort of org-like instruction for DMC that I
can use to define the starting offset of a function within the code segment.
Also, is it possible to set the code segment combine type from within DMC?
The only pragma I can find that will alter the code segment is the code_seg()
pragma, and that only changes the name.

(I can edit the records of the .obj file to achieve what I want, but that's
sort of lame.)
Feb 23 2010