Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,156 of 4,255    |
|    Joe Monk to All    |
|    Re: small memory model    |
|    17 Apr 22 12:33:36    |
      From: joemonk64@gmail.com              > Why is it necessary to eliminate the separate code,        > data and stack segments? These are located at        > fixed, consecutive locations in the executable. Why        > can't the startup code just set ds and ss to those        > fixed offsets from cs?        >        > It seems to me that if the above is done, the .com file        > would still be able to be loaded anywhere in memory,        > and allow 64k code, 64k data and 64k stack.               The COM format is the original binary executable format used in CP/M       (including SCP and MSX-DOS) as well as DOS. It is very simple; it has no       header (with the exception of CP/M 3 files), and contains no standard       metadata, only code and data. This        simplicity exacts a price: the binary has a maximum size of 65,280 (FF00h)       bytes (256 bytes short of 64 KB) and stores all its code and data in one       segment.              Since it lacks relocation information, it is loaded by the operating system at       a pre-set address, at offset 0100h immediately following the PSP, where it is       executed (hence the limitation of the executable's size): the entry point is       fixed at 0100h This        was not an issue on 8-bit machines since they can address 64k of memory max,       but 16-bit machines have a much larger address space, which is why the format       fell out of use.              In the Intel 8080 CPU architecture, only 65,536 bytes of memory could be       addressed (address range 0000h to FFFFh). Under CP/M, the first 256 bytes of       this memory, from 0000h to 00FFh were reserved for system use by the zero       page, and any user program had        to be loaded at exactly 0100h to be executed. COM files fit this model       perfectly. Before the introduction of MP/M and Concurrent CP/M, there was no       possibility of running more than one program or command at a time: the program       loaded at 0100h was run,        and no other.              https://en.wikipedia.org/wiki/COM_file              Joe              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca