4 ms·
At one point I added the "v" memory model for Zortech C++, which was a virtual memory system for code. Functions would be loaded from disk on demand, and discar
by WalterBright 6y ago
At one point I added the "v" memory model for Zortech C++, which was a virtual memory system for code. Functions would be loaded from disk on demand, and discarded from memory when not needed. The loader would do all the fixups necessary. I was pretty proud of it, it was far better than the usual hierarchical overlay system.
But by then people were using 286 DOS extenders which were better.
- sedatk 6y agoOverlays were still useful if your target systems had 1MB or less memory.
- bluedino 6y agoIs there a good article on how DOS overlays worked? Back when I learned (?) C, I never learned about the x86/DOS memory models. I just knew I was always hitting the 64k limit, and fortunately DJGPP existed at the time so I just switched from Quick C/Turbo C to that.
- sedatk 6y agoOverlays implied a specific kind of resource management about keeping unused code on the disk and loading it on demand. Doing that required help from linker so they were mostly implemented by the language like Turbo Pascal/Turbo C's "FBOV" overlays. You could also keep resources in overlays too but they didn't have a resource management mechanism if I recall correctly. You had to implement it yourself.
- WalterBright 6y agoOverlays were not part of the DOS operating system. But there were at least three different methods: 1. the traditional one (used by the PDP-11), where overlays were loaded into fixed addresses. This was used by Microsoft tools. 2. Borland's "Zoom" overlays, I forgot how that worked. 3. Zortech's "virtual" system where overlays could be loaded into whatever memory was available
- skissane 6y ago> Overlays were not part of the DOS operating system. Microsoft introduced overlay support in MS-DOS 2.x, via the "load overlay" function – INT 21h,AH=4Bh,AL=03h. You can see the references in the MS-DOS source code here: https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/EXEC.ASM#L16 https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/... This was already known long before Microsoft released the MS-DOS 2.x source code; Ralf Brown's Interrupt List documents it: http://www.delorie.com/djgpp/doc/rbinter/id/51/29.html http://www.delorie.com/djgpp/doc/rbinter/id/51/29.html http://www.delorie.com/djgpp/doc/rbinter/it/91/15.html http://www.delorie.com/djgpp/doc/rbinter/it/91/15.html
- anyfoo 6y agoYou might be interested to read how it was done on the first Windows versions on 8086 (from the same author): https://devblogs.microsoft.com/oldnewthing/20110316-00/?p=11203 https://devblogs.microsoft.com/oldnewthing/20110316-00/?p=11...