Problems with the C environment:
L. Stewart, D. Swinehart, June 30, 1982 10:17 AM
[ Bracketed comments have been inserted since this list was used to generate the "wish list" for Bill Duvall. ]

Priority order

Compiler runs out of space.
Test case:
Test122.c
Test123.c (same, but most nested structures replaced by int[n])
[This can be repaired (for our environment) by doubling the space allocated to structures and their fields. We have written no programs that could not be accommodated by this change. Requires only an edit of a constant definition, although a size switch in the command line would be nice.]

Ldr86 runs out of space on suitably large programs. Perhaps change it so that all Externals need not be resolved on the first pass. (e.g. LDR86 should be able to run multiple passes.) It could be used as the assembler second pass on each file.
[This remains our major problem. Physical memory of the target machine (currently 64KBytes) should be the only limitation to program size. ]

Compiler, assembler, loader to run on D-machines.
[We have produced Dorado microcode to support the XMem operations and the "Toolbox" version of getframe(). We need not run these programs on Dolphins. In order to run these programs, the call on InitBCPLRuntime() must be inhibited. This should be done automatically by checking the machine version information. ]

Direct to memory operations on structure fields don’t work. They always reference the first word of the structure.
Test case:
Test117.c

JUMP range overflows
I have a program that won’t link because a short jump won’t reach.
Test case:
Test115.c
Test115.ld
Test115ls.cm
Directions: Run @Test115ls.cm@ and observe LOC-86 error message.

I remember having trouble with case statements in other code as well.
If the case statement is too complicated or too long it quits working.

Cannot generate address of procedure
The C86 description indicates that it is not possible to do this, but we understood that it should be possible anyhow to produce the address of a procedure. Test124.c makes an unsuccessful stab at it.
Once we have the address, we have a procedure that can be used to call the target procedure, so that part of it’s under control.

Minor stuff

Sys.bk. Some way to link programs to the separately linked and loaded stuff in EPROM. Intel loader has something called PUBLICSONLY that might do it.

GROUP directives
I have not been able to link together two C generated programs
Test case:
Test114a.c
Test114b.c
Test114.ld
Test114ls.cm
Directions: Run @Test114ls.cm@ and observe LOC-86 error message.

The problem appears to be that multiple GROUP directives break
the loader. I don’t believe that the GROUP directive in the assembler
files produced by the compiler are actually needed. Perhaps the simplest
solution is to take them out.


The loader does not produce an error file. Usually there will be error
messages flashed on the display, but they will scroll off. The .map file
usually winds up empty. Perhaps the problem is that IO is buffered and
doesn’t get written to disk.

When there is an undefined external in a link, the linker mentions it, but
then proceeds to produce piles of "Multiply Defined" messages for a lot
of other symbols.


Minor stuff, unordered

The date printed by the C compiler is still July 1, 1981.

.ERR files produced by the compiler have two difficulties. First, the err file says "C errors for file foo.err" instead of "C errors for file foo.c".
Second, the C compiler prints warning messages for undefined static variables, but does not stop. Since I use command files, and immediately assemble the
.asm file, the assembler overwrites the .err file produced by the compiler and I never see it! Perhaps the c compiler could write .CERR files instead, so
the information would not be lost. In my code, undefined statics are usually bugs.

When there are no errors, the compiler and assembler still produce .err files. It would be nice if in this case the .err file was deleted. That would permit me to use the IF.run program in command files to stop on an error. The compiler and assembler might also include a "don’t stop on error" option to further this goal.

Assember thinks AH is the same as AL.
Test case:
Test118ml.asm
Test118.ld

I have not been able to figure out how to make ORG work in the assembler.

Move immediate to memory
I have not been able to generate a move immediate to memory instruction.
Test case: Test112ml.asm

Forward References
I have not been able to get FORWARD to work
Test case: Test 113ml.asm and Test113.ld.
Directions: Assemble and load, then look at .map file

Confusion when doing character-sized assignment operators
Test124.c includes an assignment operator (+=) whose target is a
character quantity, and whose right hand side is a moderately complicated expression. The compiler gets into internal register difficulty with it. The expression is something like
char *c;
*c += LowerCase(mesaString->text[i]) << 1;
Replacing the rhs by a variable fixes the problem.

[ Actually, a number of other +=, -=, etc., operations fail to work properly -- esp. when the lhs is a pointer. DCS ]

[ The stack is malformed after conditional expressions in (at least) one of the arms is sufficiently complicated.
Test case: Test124.c and Test124.asm ]

[ Confusion when multiple "loopholes" are specified in the same expression.
Test case: Test125.c and Test125.asm ]