Skip to content

doslib-20161113-083809-commit-f5ac4b3f27421816766c23ba7dc270b0dc56124a

Compare
Choose a tag to compare
  • Added hw/dos headers to describe EXE headers, and MS-DOS device driver requests and structures.
  • New DOS library function to load the contents of an EXE into memory, and to apply relocations
  • New CLSG "dynamic" module loader. CLSG is a simplified form of DLL for DOS where code can be loaded into memory and accessed by ordinal at runtime. Downsides of course are: no symbols by name, no dependency management, no discardable segments, unloading and loading done at the whim of the programmer using the CLSG module.
  • MS-DOS device driver examples. It is now possible to compile MS-DOS device drivers in C. Two examples are provided: one that uses the EXE form of device driver (like what EMM386.EXE does), and the other takes the flat non-EXE .SYS format that is widely known. It turns out Watcom C can be made to generate flat (within 64KB) code and data by stuffing everything into DGROUP and compiling with the small memory model with DS pegged to DGROUP. Example includes division of code and data into init and non-init sections so init code can be discarded after INIT call. Drivers have been tested so far only under Windows 95.
  • New perl scripts to generate .asm files for CLSG and MS-DOS device driver "headers" to help automate compilation.