Programming some small DOS programs has made me learn a bit more about it, and real-mode programming in general.

For example, I thought DOS was essentially a single-process, full memory ownership sort of affair (sans resident code hacks), but that's not true at all. Multiple programs can be loaded at the same time, with DOS keeping tabs of memory allocations. The basic variant of this being one program starting another, and then the second exiting, returning to the first.

(But let's not make $-terminated strings a thing again! Or length-prefixed, \r-terminated strings, wat)

#RetroProgramming #DOS

@sjmulder

Yeah, you can't have drivers, TSRs, or child processes without a kernel memory manager. It also has a relocating program loader for the same reason.

Later DOS versions have a MEM command that shows the kernel's view of current memory allocations.

Fun fact: DOS also has Unix-like file descriptors! The original version of DOS had user-space file control blocks like CP/M, but Microsoft quickly moved to the Unix style instead.