Conventional memory under DOS (fist 640kB) contains the operating system, drivers, and possibly one executing program. How is this memory laid out to avoid conflict between those programs? For example, is part of that address space reserved?
Conventional memory under DOS (fist 640kB) contains the operating system, drivers, and possibly one
Share
DOS loads the program into memory, using information in the EXE header to relocate memory references to be correct relative to the memory block assigned by DOS when the EXE is loaded.
Having said that, nothing prevents your program from interfering with the OS, device drivers, etc. You can read and write any memory location. This technique was commonly used e.g. by TSR programs (rewriting the interrupt vector table) to hook the keyboard, timer, mouse, or similar and then terminate while remaining in memory.