jca@pnet01.cts.com (John C. Archambeau) (04/29/89)
I posted previously that I seemed to have found a bug in Turbo C 1.5, well I called Borland's Tech Hotline the other day and I was amazed, but relieved to find out that the problem wasn't with Turbo C, but with the assembler I was using for the assembler modules that were linked in with the C code. The problem is with A86, since A86 doesn't support the convient assume directive that's found in MASM, you have to explicitly initialize segments, here's why: In all switch code in Turbo C 1.5, there is this one statement in assembly code: jmp word ptr cs:[bx+(some offset)] Since A86 doesn't initialize segments implicitly (as MASM does), cs is set to some random value at link time. Because of this, at runtime, you are given the illusion that the compiler is at fault when in fact it's not. So when using an assembler that's not 100% MASM compatable, beware. When dealing with C and assembler the "it's your funeral" philosophy definately applies. I probably should have known this before, since there are a lot of caveats with using A86 over MASM. My thanks to Borland for being nice about handling the situation when I called and pointing me towards the real problem. It reaffirms my faith in Borland's compilers, but it definately gives me something to grumble about when it comes to the A86 assembler. It might be the fastest 80x86 assembler out there, but it has something to be desired with compatability (quite a bit actually). JCA UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!jca ARPA: crash!pnet01!jca@nosc.mil INET: jca@pnet01.cts.com
smvorkoetter@watmum.waterloo.edu (Stefan M. Vorkoetter) (04/30/89)
In article <4139@crash.cts.com> jca@pnet01.cts.com (John C. Archambeau) writes: >... but it definately gives me >something to grumble about when it comes to the A86 assembler. It might be >the fastest 80x86 assembler out there, but it has something to be desired with >compatability (quite a bit actually). The way I see it, it is MASM's fault (and TC's) for not being compatible with A86. I find A86 much easier to use than MASM. Just my $2 worth. Stefan