4 ms·
Is 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 hittin
by bluedino 6y ago
Is 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