DOS Overlay file (.ovl) in C++ and DOS relocation table

Hi all,
1)
    I would like to create .ovl files for my C/C++ programs like .ovr's in PASCAL because I would like to seperate the main code with the subcode such as the setup program. Do you know how to do?

2)
Also, i'm checking out the usage of the relocation table in dos header and i'm not quite sure why the first relocation table item (offset) contains 01 00 and segment contains 00 00, my program actually starts at 200h, and the second relocation item is also set to 8c 00 00 00. does it mean that thesecond segment starts at 00 8c (offset) with a displacement of 8c hex from the start of the file?
here is a dump of my program:
4D 5A 5E 00 88 00 38 00 20 00 C8 05 FF FF 8D 14
00 20 00 00 00 00 00 00 3E 00 00 00 01 00 FB 30
6A 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00
00 00 8C 00 00 00 7A 01 00 00 29 5D 00 00 30 5D
00 00 37 5D 00 00 3E 5D 00 00 5D 5D 00 00 6F 5D
00 00 8F 5D 00 00 A2 5D 00 00 BE 5D 00 00 C5 5D
00 00 CE 5D 00 00 FA 5D 00 00 09 5E 00 00 35 5E
00 00 3C 5E 00 00 43 5E 00 00 5E 5E 00 00 7D 5E
00 00 8D 5E 00 00 A2 94 00 00 A4 99 00 00 C1 99
00 00 40 00 37 0D 5B 00 37 0D 75 00 37 0D 7C 00
37 0D F7 00 3F 0D 0B 01 3F 0D 16 01 3F 0D B0 00
51 0D BB 00 51 0D 4F 01 51 0D 5D 01 51 0D C0 00
6E 0D C8 00 6E 0D D7 00 6E 0D E4 00 6E 0D 1C 02
6E 0D 5F 09 6E 0D 1B A6 00 00 20 A6 00 00 3D A6
00 00 42 A6 00 00 51 A6 00 00 89 A6 00 00 53 AB
00 00 60 AB 00 00 65 AB 00 00 AF AB 00 00 F6 AB
00 00 EA AC 00 00 77 B5 00 00 2A B7 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
B8 6B 0F 8E D8 FA 8E D0 BC 20 72 FB FC 8C 06 AE
15 E8 E3 06 BF B4 15 B9 07 02 33 C0 1E 07 F3 AB
1E BA 79 01 0E 1F B8 23 25 CD 21 FC 1F BB 00 00
E8 88 06 8E 06 AE 15 26 8A 1E 80 00 32 FF 26 C6




whlukAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Tommy HuiConnect With a Mentor EngineerCommented:
Borland C++ supports overlay for DOS.
0
 
nietodCommented:
It is up to your C++ compiler and linker as to whether or not you can have overlays.  I've never seen a C++ compiler that supports overlays.  The other option is to do it yourself, but that is a bit of work (I've done it).  However, you seem to like to look into the nasty stuff.
0
All Courses

From novice to tech pro — start learning today.