Using overlays to hide initialization code (Developers)
> ... or would somebody who wanted to do that have to roll
> their own using the DOS function calls to load an overlay?
>
> (I'm using Open Watcom 1.9.)
I don't think there is a much better approach than using overlays.
The most extreme memory saving DOS program that I put my hands on is DEBUG. Here the initialization code is at the end of the binary, behind data and stack. After initialization, the place is used for uninitialized variables. But DEBUG is an assembly program, where full control for segments and their ordering is possible. With Open Watcom, you're more or less stuck to the DOSSEG segment ordering ( 1. code, 2. segments not belonging to dgroup, 3. dgroup ). In protected mode, you possibly could mark sections (16-bit) or pages (32-bit) as discardable, but for real-mode I cannot see anything similar.
---
MS-DOS forever!
Complete thread:
- Using overlays to hide initialization code - mbbrutman, 06.08.2026, 07:29 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Using overlays to hide initialization code - mceric, 06.08.2026, 10:27
- Using overlays to hide initialization code - Laaca, 06.08.2026, 11:14
- Using overlays to hide initialization code - Japheth, 06.08.2026, 21:36
- Using overlays to hide initialization code - Oso2k, 06.08.2026, 22:07
- Using overlays to hide initialization code - bretjohn, 06.08.2026, 23:14
- Using overlays to hide initialization code - marcov, 06.08.2026, 23:17
- Using overlays to hide initialization code - mbbrutman, 07.08.2026, 01:15
- Using overlays to hide initialization code - bretjohn, 07.08.2026, 02:02
- Using overlays to hide initialization code - marcov, 07.08.2026, 10:06
- Using overlays to hide initialization code - bretjohn, 07.08.2026, 02:02
Mix view