Using overlays to hide initialization code (Developers)
> TSRs and device drivers have a simple approach to this - just put the
> initialization code at the end, and then use that memory for other storage
> or return it to the system.
For TSR's, I use a method I learned from ECM. I move the running program (including initialization code) to the top of conventional memory, and then "install" the TSR in free memory space wherever appropriate ("holes" in conventional or upper memory, EMS, DPMS, allocate XMS memory if needed, etc.). If the TSR is complicated, I divide it up into smaller chunks to give it a greater chance of finding a memory "hole" somewhere. I can even install a TSR, uninstall it, and then install it again in the same memory space even if other programs were installed afterwards. It's a very flexible method.
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