Re: A92: PlusC sources, probably features


[Prev][Next][Index][Thread]

Re: A92: PlusC sources, probably features




>Interesting paradox you've set up there in that paragraph by first
>stating that you'll do an ANSI compatible implementation, but with
>a different calling convention for library functions.  If you start
>putting C++ and UltraPascal operators as part of that grammer of
>PlusC, then you have already departed from the ANSI standard for C.
>I would strongly recommend you not pollute your implementation any
>more than is absolutely necessary for use on the TI.  Also, ANSI C
>will push its function parameters on the stack in REVERSE order,
>which you appear to have backwards in your definition.

Generally aren't there other subprocedure implementation standards, like
return values placed in D0 or something?  I remember that in the Whitesmith
C for the 68K years'n'years ago, but I'm not sure if that was in any way
ANSI compatible....

>You appear to be building a library in an object oriented fashion
>just so you can use the '::' operator.  You also appear to be using
>the Pascal ':=' assignment operator.

Ah!  I KNEW something looked wrong there!  :-)  I'm not the most proficient
C dude, but aren't libraries in C usually incorporated using .h files and
show up transparently?  (Like, stdio.h provides I/O routines, but you don't
have to say stdio::printf or whatever?)  I'm not sure if I'm right on this
so feel free to flame me. :-)

>Remember that you are not dealing with a microcomputer...you're
>actually much closer to the world of embedded systems.  Maybe you
>ought to check out some ANSI C compilers for other embedded micro-
>processors (eg. 8051, 6502, 68HC11, 68332, etc.) for ideas.  For
>instance, I use an ANSI C cross compiler for the 89C52 at work.

I think I've said this before, but there -are- 68000 C implementations out
there.  I mean, this was the most powerful home computer chip throughout
the 80's.  (Except that they had to go and put it in Macs. :-)  I have a
feeling we're re-inventing the wheel here...surely there's a compiler out
there that we can use straight or modify slightly?  (And wouldn't most
modifications lie in libraries for complex tasks like I/O, memory
management [malloc and such], and other system-specific tasks, not
necessarily in expression processing and subroutine control?)

--Cliff Biffle




References: