george@mnetor.UUCP (George Hart) (09/23/86)
A friend of mine is a consultant and has a contract that requires him
to generate ROMable code for a '186 based SBC. Microsoft C V4.0, with
Codeview, etc., seemed a good bet. In fact, Microsoft (in one of its
marketing glossies) claims it can generate ROMable code.
Alas, in none of the documentation binders is there any information on
how to do it or if it is even possible. Microsoft support, in their
typical fashion, claims they don't support ROMable code other than by
supplying the code for the startup routine (how do they get away with
biting the hands that feed them all the time).
Needless to say, my friend is more than annoyed, especially since there
are existing compilers costing 75% less than MSC V4.0 that generate
ROMable code.
Can anyone shed light on this?
MICROSOFT: ARE YOU LISTENING?!
--
Regards,
George Hart, Computer X Canada Ltd.
UUCP: utzoo
>!mnetor!george
seismo
BELL: (416)475-8980
james@osi3b2.UUCP (James R. Van Artsdalen) (09/25/86)
In article <3720@mnetor.UUCP>, george@mnetor.UUCP (George Hart) writes: When microsoft claims that they can support ROMable code, they probably mean that since you have the source to the startup and exit routines, you can force the generated code to be located at the address of the ROM and force the data and stack to be where known RAM is, instead of letting the linker choose the addresses. I don't know if their linker will let you do this or if you have to write your our linker from their documentation. Possible, but not trivial. > Needless to say, my friend is more than annoyed, especially since there > are existing compilers costing 75% less than MSC V4.0 that generate > ROMable code. MS-C may be very expensive, but it generates excellant code, enough so that there is rarely a need to hand-code routines. You could do better by hand of course, but you're past the point of dimishing returns in most cases. The compiler is also slow compared to others I am told, but it is very complete, and the source-level debugger that comes with it is outstanding (if it works with your EGA - it doesn't work well with mine). I am using it for Ultima IV because of the code quality and the debugger. -- James R. Van Artsdalen ...!ut-ngp!utastro!osi3b2!james Live Free or Die
wwc@newton.physics.purdue.edu (William W. Carlson) (09/26/86)
It is entirely possible to generate ROMable code with the MSC compiler. I have done it with V3.0 and have no doubt the same is true for V4.0 (I havn't gotten my update yet). It is true you will have to write your own startup code, but all that involves is intializing the segment registers and setting up the stack pointer to somewhere useful. Also, you will need to write a little masm code to put in a jmp insturction at FFFF0H to the startup code you write. I have mainly used small model stuff, which makes the DS setup easier, but with a little work any model should be able to work. I wholeheartedly agree with the other followup that MSC generates great code, I have looked at some of it and can't see how one would do much better, even in assembly. MSC V4.0 claims to have improved the optimization, which should make it even better! Bill Carlson wwc@newton.physics.purdue.edu ..!ihnp4!pur-ee!wwc