And much like with the C64, the BIOS maintains a memory map.
http://wiki.osdev.org/Memory_Map_%28x86%29