cramer@kontron.UUCP (Clayton Cramer) (07/12/85)
There are several different memory segmentation models on the 8086 family: small 64K code, 64K data medium many 64K code segments, 64K data segment large many 64K code segments, many 64K data segments One of the nice things about writing code in assembler for the PC is that you run the resulting .EXE file through EXE2BIN and get a .COM file. Wouldn't it be nice if Microsoft (and everyone else) supported a new memory segmentation module with code and data in the same segment, so we could create .COM programs written in C? Maybe we could call it "miniscule" module.
ludemann@ubc-cs.UUCP (Peter Ludemann) (07/15/85)
In article <368@kontron.UUCP> cramer@kontron.UUCP (Clayton Cramer) writes: >One of the nice things about writing code in assembler for the PC is that >you run the resulting .EXE file through EXE2BIN and get a .COM file. Sorry to disappoint you, but .COM doesn't buy you much. A friend of mine wrote a program to convert and .EXE file to .COM by turning the relocation information into code which modified the code segment when the program was executed (of course, the resulting code was not position independent). The result: the generated .COM file was about the same size as the original .EXE file and it loaded about as fast.
alan@drivax.UUCP (Alan Fargusson) (07/15/85)
> There are several different memory segmentation models on the 8086 family: > > small 64K code, 64K data > medium many 64K code segments, 64K data segment > large many 64K code segments, many 64K data segments > > One of the nice things about writing code in assembler for the PC is that > you run the resulting .EXE file through EXE2BIN and get a .COM file. > Wouldn't it be nice if Microsoft (and everyone else) supported a new > memory segmentation module with code and data in the same segment, so > we could create .COM programs written in C? > > Maybe we could call it "miniscule" module. It is called 8080 model. The only people that use it are the CP/M-86 guys like Micro-Pro that converted there CP/M-80 programs to 8086 assembler. I have heared of some people hacking small model C program into 8080 model, but I don't know the details. -- Alan Fargusson. { ihnp4, amdahl, mot }!drivax!alan
bright@dataio.UUCP (Walter Bright) (07/17/85)
In article <368@kontron.UUCP> cramer@kontron.UUCP (Clayton Cramer) writes: >One of the nice things about writing code in assembler for the PC is that >you run the resulting .EXE file through EXE2BIN and get a .COM file. >Wouldn't it be nice if Microsoft (and everyone else) supported a new >memory segmentation module with code and data in the same segment, so >we could create .COM programs written in C? The Datalight C compiler explicitly supports this memory model.
zemon@fritz.UUCP (Art Zemon) (07/17/85)
In article <> cramer@kontron.UUCP (Clayton Cramer) writes: >Wouldn't it be nice if Microsoft (and everyone else) supported a new >memory segmentation module with code and data in the same segment, so >we could create .COM programs written in C? Manx's Aztec C compiler does let you do this. Just type "ln -o foo.com" instead of "ln -o foo.exe". -- -- Art Zemon FileNet Corp. ...! {decvax, ihnp4, ucbvax} !trwrb!felix!zemon
peter@kitty.UUCP (Peter DaSilva) (07/18/85)
> There are several different memory segmentation models on the 8086 family: > > small 64K code, 64K data > medium many 64K code segments, 64K data segment > large many 64K code segments, many 64K data segments Actually small model on microsoft & lattice compilers is 64K total code and data, as you suggest. If you're careful the resulting file can be exe2bin-ed with no problems. I wish lattice supportted 64K code plus 64K data (split I&D)... it currently has the following: small 64K code+data prog LARGEK code + 64K data data 64K code + LARGEK data dataS 64K code + many 64K data large LARGEK code+data. largeS LARGEK code + many 64K data LARGEK isn't implemented as a lot of segments, but rather as 32 bit pointers of some non-contiguous form. It looks like regular 20 bit pointers except you can't pretend they're longs.
caf@omen.UUCP (Chuck Forsberg WA7KGX) (07/19/85)
In article <716@dataio.UUCP> bright@dataio.UUCP (Walter Bright) writes: >In article <368@kontron.UUCP> cramer@kontron.UUCP (Clayton Cramer) writes: >>One of the nice things about writing code in assembler for the PC is that >>you run the resulting .EXE file through EXE2BIN and get a .COM file. >>Wouldn't it be nice if Microsoft (and everyone else) supported a new >>memory segmentation module with code and data in the same segment, so >>we could create .COM programs written in C? > >The Datalight C compiler explicitly supports this memory model. The requirement for a .COM file is that the loaded "stuff" not exceed some size (64k?) and there be no relocation or segment fixups. Obviously, an 8080 model (DS=SS=ES=CS) program would fit into a .COM file. Many small model programs can fit also, provided the text+data is less than 64k and the program itself sets up the data segment. You could even get away with a large or huge model program provided the text+data fit within the 64k (i.e. memory allocated dynamically). -- Chuck Forsberg WA7KGX ...!tektronix!reed!omen!caf CIS:70715,131 Omen Technology Inc 17505-V NW Sauvie Island Road Portland OR 97231 Voice: 503-621-3406 Modem: 503-621-3746 (Hit CR's for speed detect) Home of Professional-YAM, the most powerful COMM program for the IBM PC