piclist 1995\12\01\114538a >
Thread: PIC_C compiler
face BY : Tommy Brown email (remove spam text)

Hi, I have noticed a lot of activity with reference to C compilers,
and remembered that I had seen such a type for PIC 16C5X.  I had
retrieved it, thinking it was a PIC asm program, as only 14k zip

When I unzipped it, I noticed txt file describing the PIC_C
compiler.  I kept the pic_.txt file, and name of the file
pic_c.zip.  That way in future, if I decide to try PIC_C I can
use archie to search for the file again.  In my notes the file
name is:

pic_c.zip size 14k

I was following a web link reference, looking for free interpreters
and compilers for microprocessors, at:

ftp.uoknor.edu/  (University of Oklahoma at Norman)

The creation date of the file "pic_c.txt", is Nov, 1992.  I don't
know if the address of the author is correct now or not.  However,
it appears to be a C-Compiler, written for 16C5X chips with 2 level
stacks, using the Parallax Instruction Set.  There is mention of future
upgrades.  I enclose the pic_c.txt file verbatim for anyone
interested in this.

Note: It is shareware $25.00 and limited to 500 lines of Program.

                          Release 1.0

    This software is owned by Collin Brendemuehl/DPC.  It is not
"public domain".  You may register your copy with DPC by sending
$25.00 (US) to:

         Attn: PIC C
         103 S Broadway Suite 101
         Edmond OK 73034

    Registered users will receive updates to the compiler as
they become available.

    Source code to the compiler is available for the sum of
$150.00 (US).  With the source code the user may make those
enhancements desired or needed.

    The PIC micro-controllers from Microchip have, for the type
of work that I do, proved themselves very useful.  It is easy to
use and has a simple instruction set.  But as a C programmer, I
don't always like to work with multiple assembler formats, one
for each micro-controller.  There exists too much to do and not
enough hours in the day.

    Each system has its own unique characteristics that need to
be remembered.  While that can be done, I'd rather not take the
time and clutter my mind with unnecessary information.  Rather,
I'd prefer to continue programming in C and forget the rest.
(That's what reference manuals are for!)

    I purchased a Parallax development system for my projects,
but soon became frustrated at not having a C compiler available.
Hence, a few hours programming and "Voila!", I can now do my PIC
programming in C.  The listings include the compiler along with
some sample code.  In the sample code you'll see some of the
characteristics of the PIC that make it unique.

    First, a PIC can only call 2 levels of subroutines.  If you
call 3, you'll NEVER return to the first.  That can be hair-
raising to have happen.  But having a C compiler can help you
control that problem.

    The "for", "while" and "if" operations make use of the
"CJxx" (compare and jump if false) instructions within the
Parallax instruction set.  I use these instead of the "CSxx"
(compare and skip if false) to allow more space for inserting
code for customization.

    Supported items include:
         == !=
         <= <
         >= >
    Virtually no "lint" operations are performed.  This allows
the user to execute an assignment to a pre-defined register, such
as 'C'.

Syntax Restrictions:
    The simplicity of this compiler makes it useful for simple
projects.  Inherent in this is some limitation on the nature of a
C statement.  You will notice in the example given that no math
is allowed in the "rvalue" part of a statement ( to the right of
an assignment ).  This made creation of the compiler simpler and
also more efficient.

    Complex conditions are not allowed.  Only a single lvalue, a
comparison, and a single rvalue are allowed.

    The compiler generates no errors.  For instance, if a com-
ment trailing "*/" is ommitted, the compiler will just keep on
running and your system will be "hung".

    The compiler will only read 500 lines of code for a program.

    You may add in-line assembler by using the "#A" directive.
Place the #A before each line containing a line of assembler.
This line will be output as-is to the output file.

Future Enhancements
    Over the next year I have the following enhancements in mind
to make to the compiler:

    1.   "for" and "while" loop enhancement
              (Currently the loop is clean but inefficient)

    2.   Data passing when calling a function
              (Single data element in W)

    3.   Data returns from a function
              (Single data element in W)

    You may have more enhancements that you wish to see.  Please
mail your suggestions.

    No warranty is made as to the effectiveness or quality of
this software package.

* Tom Brown
E-Mail:@spam@tombrown.....spamEraseMEindo.net.id  *
* Bumi Karang Indah                                Phone: 62-21-7508264        *
* Jalan Karang Asri II,       **************************************************
* Blok C2/#43, Lebak Bulus  *    "If something is worth doing,
* Jakarta, Seletan 12440   *           It's worth doing right the first time"  *
* Indonesia               *                                                    *

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) PIC_C compiler

month overview.

new search...