[net.micro.cbm] C-POWER, a 'practical' evaluation

dwl10@amdahl.UUCP (Dave Lowrey) (06/04/85)

I have recently completed porting a 6502 assembler, written in C, to
my Commodore 64, using C-POWER. I think my expirences may be of
interest to others now using, or considering using C-POWER.

But first, my two cents on the current discussion on C-POWER
documentation. Yes, it sucks, but I managed to figure it all out in
a an hour of not too dificult work. The C book is pretty lame, but
I guess that it's better than nothing if you don't know C (I do).

Now, on to the assembler....
The assembler was obtained from this net. It compiles clean on our
UTS (System V on amdahl cpu's). It is large, 1365 lines total in 4
source files, and 71 lines in 2 include files.

After downloading the files to my 64, I broke the 4 source files up
into aprox 25 individual files, each containing one function. This
was so I didn't have to re-compile half the world whenever I needed to
change one line in one function.

I then compiled each module. When I linked the program, I ran into a
problem with too many external references. This was solved by
inputting two thirds of the object modules, including the
system libraries, inputting the rest of the object modules,
then, the system libraries again.

I executed the program, and it promptly threw up.

To make a long story short, the following modifications were required
to make the program run with C-POWER:

  1 - Most of the ints were changed to unsigned, this was done mainly
      for performance reasons, it wasn't necessary for the program
      to run.

  2 - The program assumed that it was using the ASCII character set.
      C-POWER uses the (yuck) CBM character set, so a small portion
      of the code had to be re-written.

  3 - All references to the tab character (\t) had to be removed.
      C-POWER doesn't recognise this as a 'special' character,
      so it is treated as the character t.

  4 - An int  variable was explicitly declared as auto, so that it's
      address could be passed to a function.

The assembler works perfectly now. I am in the process of converting it
to output object files in C-POWER format.

I did several things to improve my productivity:

  1 - I purchased the EPYX Kwik-Load cartridge. This speeds up
      compilation time tremendously. But, the following C-POWER shell
      command should be executed before and after calling the compiler...
          disk u;
      This resets the 1541's DOS. C-POWER's copy protection scheme and
      Kwik-Load must collide some how.

  2 - I created 'object' libraries. This way I didn't have to enter every
      object module's name each time I link the program. The program
      to create libraries is on the C-POWER BBS.

The Bottom Line:
  I feel that the conversion effort to port this program was
  reasonable, considering the size and complexity of the source.
  No bugs or problems were encountered with C-POWER, and I don't
  hesitate to recomend the product to others.
-- 
-------------------------------------------------------------------
                               Dave Lowrey

"To vacillate or not to vacillate, that is the question....
 ....or is it?"
                                ...!(<sun,cbosgd,ihnp4}!amdahl!dwl10

[ The opinions expressed <may> be those of the author and not necessarily
  those of his most eminent employer. ]