Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » Other C64/128 C compilers?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Other C64/128 C compilers? [message #32757] Fri, 11 January 2013 12:18 Go to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
I have Turbo C, Power C 64/128 and cc64. Cc64 sem
Re: Other C64/128 C compilers? [message #32758 is a reply to message #32757] Fri, 11 January 2013 12:23 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
Pressed the wrong button! Sorry! :( Of course, the keyboard on which I'm working is faulty! :(

I have Turbo C, Power C 64/128 and cc64. Cc64 has a nasty bug with global variables, and I haven't gotn around to using the others. I'm looking to progamming on a _real_ C64/128--or at least on the emulators. Where can i find such?
Re: Other C64/128 C compilers? [message #32759 is a reply to message #32758] Fri, 11 January 2013 12:54 Go to previous messageGo to next message
rusure is currently offline  rusure
Messages: 1030
Registered: March 2012
Karma: 0
Senior Member
On Friday, January 11, 2013 10:23:56 AM UTC-7, Harry Potter wrote:
> Pressed the wrong button! Sorry! :( Of course, the keyboard on which I'm working is faulty! :(

>

>

>

> I have Turbo C, Power C 64/128 and cc64. Cc64 has a nasty bug with global variables, and I haven't gotn around to using the others. I'm looking to progamming on a _real_ C64/128--or at least on the emulators. Where can i find such?


I think ABACUS may have had a PASCALE but I sold mine to probably a Canadian. He sent me a $20 bill USD in the mail. That doesn't happen frequently.
Re: Other C64/128 C compilers? [message #32806 is a reply to message #32757] Fri, 11 January 2013 15:13 Go to previous messageGo to next message
Payton Byrd is currently offline  Payton Byrd
Messages: 1198
Registered: December 2011
Karma: 0
Senior Member
On Friday, January 11, 2013 11:18:43 AM UTC-6, Harry Potter wrote:
> I have Turbo C, Power C 64/128 and cc64. Cc64 sem


http://www.lyonlabs.org/commodore/powerc.html
Re: Other C64/128 C compilers? [message #32916 is a reply to message #32758] Sat, 12 January 2013 04:24 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Harry Potter wrote:

> Pressed the wrong button! Sorry! :( Of course, the keyboard on which

> I'm working is faulty! :(

>

> I have Turbo C, Power C 64/128 and cc64. Cc64 has a nasty bug with global

> variables, and I haven't gotn around to using the others. I'm looking to

> progamming on a _real_ C64/128--or at least on the emulators. Where can i

> find such?


what nasty bug that noone else but you encountered would that be?

and i very much doubt you will have a lot of success with doing what you did
on cc65 with a compiler like power-c. cc65 is lightyears ahead regarding
stability and featureset. (power-c is K&R to begin with...)

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

I am lucky I am such a bad ass. When my gf whines about all my c64s, i just
look her in the eyes and say: "Never ask me to choose between them and you".
<Hedning/G*P>
Re: Other C64/128 C compilers? [message #33187 is a reply to message #32916] Mon, 14 January 2013 10:08 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
The bug I mentioned with cc64 is mentioned in documented in its docs, and you're right about the stability. I'd just like to play with the K&R C/nostalgia style.

On Saturday, January 12, 2013 4:24:48 AM UTC-5, Groepaz wrote:
> Harry Potter wrote: > Pressed the wrong button! Sorry! :( Of course, the keyboard on which > I'm working is faulty! :( > > I have Turbo C, Power C 64/128 and cc64. Cc64 has a nasty bug with global > variables, and I haven't gotn around to using the others. I'm looking to > progamming on a _real_ C64/128--or at least on the emulators. Where can i > find such? what nasty bug that noone else but you encountered would that be? and i very much doubt you will have a lot of success with doing what you did on cc65 with a compiler like power-c. cc65 is lightyears ahead regarding stability and featureset. (power-c is K&R to begin with...) -- http://www.hitmen-console.org http://magicdisk.untergrund.net http://www.pokefinder.org http://ftp.pokefinder.org I am lucky I am such a bad ass. When my gf whines about all my c64s, i just look her in the eyes and say: "Never ask me to choose between them and you". <Hedning/G*P>
Re: Other C64/128 C compilers? [message #33261 is a reply to message #33187] Tue, 15 January 2013 01:10 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Harry Potter wrote:

> The bug I mentioned with cc64 is mentioned in documented in its docs


could you give a link? i have used cc65 quite a lot and never knew about
such bug (or encountered it).

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

When someone says 'I want a programming language in which I need only say
what I wish done,' give him a lollipop.
<Alan J. Perlis>
Re: Other C64/128 C compilers? [message #33279 is a reply to message #33261] Tue, 15 January 2013 08:56 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
The bug is with cc64, not cc65. I can't find it on the internet anymore. :(

On Tuesday, January 15, 2013 1:10:41 AM UTC-5, Groepaz wrote:
> Harry Potter wrote: > The bug I mentioned with cc64 is mentioned in documented in its docs could you give a link? i have used cc65 quite a lot and never knew about such bug (or encountered it). -- http://www.hitmen-console.org http://magicdisk.untergrund.net http://www.pokefinder.org http://ftp.pokefinder.org When someone says 'I want a programming language in which I need only say what I wish done,' give him a lollipop. <Alan J. Perlis>
Re: Other C64/128 C compilers? [message #36848 is a reply to message #32757] Tue, 12 February 2013 15:58 Go to previous messageGo to next message
paskali is currently offline  paskali
Messages: 3
Registered: February 2013
Karma: 0
Junior Member
Harry Potter <rose.joseph12@yahoo.com> wrote:

> I have Turbo C, Power C 64/128 and cc64. Cc64 sem

>

There is Abacus-C, too. I use it and works great.

http://commodore64.wikispaces.com/Programming+languages

The Power-c has some bugs, i suggest you to avoid it.

C on Commodore 64 may be a good choice for small or middle source codes in
replacement of the interpreted basic; Abacus C has library that make able
you to play with graphic and sprites very well and very easy. However, if
you need performance and full hardware control the only choice is the
assembly; with C is possible to mix the two codes; however it is suggest
to use the last one only.

--
http://www.webuse.net/pm.php?u=2970

Posted using www.webuse.net
Re: Other C64/128 C compilers? [message #36849 is a reply to message #36848] Tue, 12 February 2013 16:39 Go to previous messageGo to next message
BLuRry is currently offline  BLuRry
Messages: 489
Registered: October 2012
Karma: 0
Senior Member
On Tuesday, February 12, 2013 2:58:07 PM UTC-6, paskali wrote:
> Harry Potter <rose.joseph12@yahoo.com> wrote:

>

>

>

>> I have Turbo C, Power C 64/128 and cc64. Cc64 sem

>

>>

>

> There is Abacus-C, too. I use it and works great.

>

>

>

> http://commodore64.wikispaces.com/Programming+languages

>

>

>

> The Power-c has some bugs, i suggest you to avoid it.

>

>

>

> C on Commodore 64 may be a good choice for small or middle source codes in

>

> replacement of the interpreted basic; Abacus C has library that make able

>

> you to play with graphic and sprites very well and very easy. However, if

>

> you need performance and full hardware control the only choice is the

>

> assembly; with C is possible to mix the two codes; however it is suggest

>

> to use the last one only.

>

>

>

> --

>

> http://www.webuse.net/pm.php?u=2970

>

>

>

> Posted using www.webuse.net


Aztec C was fairly popular in the Apple world. Did the C64 port ever catch on with any notoriety?

-B
Re: Other C64/128 C compilers? [message #36850 is a reply to message #36849] Tue, 12 February 2013 17:21 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Brendan Robert wrote:

> Aztec C was fairly popular in the Apple world. Did the C64 port ever

> catch on with any notoriety?


it also exists as a crosscompiler for the c64, see
http://www.aztecmuseum.ca/

however, these days there really is little reason to use any other compiler
than cc65 (unless you insist on using an old historic compiler ofcourse).
they all produce far worse code, have a lot of bugs, are slow, have very
incomplete libraries, usually dont support any form of half modern C
standard, etc etc.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

You think you know when you learn, are more sure when you can write, even
more when you can teach, but certain when you can program.
<Alan J. Perlis>
Re: Other C64/128 C compilers? [message #36907 is a reply to message #36850] Wed, 13 February 2013 05:55 Go to previous messageGo to next message
paskali is currently offline  paskali
Messages: 3
Registered: February 2013
Karma: 0
Junior Member
Groepaz <groepaz@gmx.net> wrote:
> it also exists as a crosscompiler for the c64, see

> http://www.aztecmuseum.ca/

>

> however, these days there really is little reason to use any other compiler

> than cc65 (unless you insist on using an old historic compiler ofcourse).

> they all produce far worse code, have a lot of bugs, are slow, have very

> incomplete libraries, usually dont support any form of half modern C

> standard, etc etc.

>

The best way to program for c64 is assembly on c64. The native c compilers may
be a good choice to avoid basic, if anyone does not want (or does not know) to
use assembly.

--
http://www.webuse.net/pm.php?u=2970

Posted using www.webuse.net
Re: Other C64/128 C compilers? [message #36938 is a reply to message #36907] Wed, 13 February 2013 09:18 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
Granted, C is a good relacement for BASIC. I really was toying around with creating C64/128 software on a C64/128. I started creating a game with BASSEM :) but never finished it :( . I was also toying aroung with creating my own C compilers: one cross-platform and one on and for each of several 6502 targets. The cross-platform one has a nasty bug to fix before I continue, and the others never got off the ground. I even want to create a UPL/Quetzalcoatl-like compiler, but I'm just thinking about it. BTW, I plan the cross-platform C compiler to have alot of optimizations and tools to make code beter and more efficient. What do you think?
Re: Other C64/128 C compilers? [message #37097 is a reply to message #36938] Thu, 14 February 2013 06:41 Go to previous messageGo to next message
paskali is currently offline  paskali
Messages: 3
Registered: February 2013
Karma: 0
Junior Member
Harry Potter <rose.joseph12@yahoo.com> wrote:

> Granted, C is a good relacement for BASIC. I really was toying around with

creating C64/128 software on a C64/128. I started creating a game with BASSEM
:) but never finished it :( . I was also toying aroung with creating my own C
compilers: one cross-platform and one on and for each of several 6502 targets.
The cross-platform one has a nasty bug to fix before I continue, and the others
never got off the ground. I even want to create a UPL/Quetzalcoatl-like
compiler, but I'm just thinking about it. BTW, I plan the cross-platform C
compiler to have alot of optimizations and tools to make code beter and more
efficient. What do you think?
>


C is an "old" language that was born when the c64 was not jet. It was planned to
avoid (or to mix with) assembly, especially on 16bit processors but also on
8bit. You should be able to make a native c-compiler for 6502/6510 and to
get good results; remember the limited resources, of course.
The cross compiler has the only advances to run on better machine and therefore
to work on more big resources that native does not have; you will be able to
compile and test more fast. However the results may be the same.


--
http://www.webuse.net/pm.php?u=2970

Posted using www.webuse.net
Re: Other C64/128 C compilers? [message #37105 is a reply to message #37097] Thu, 14 February 2013 09:08 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
Thank you, paskali. You made my day! :)
Re: Other C64/128 C compilers? [message #37227 is a reply to message #36938] Fri, 15 February 2013 01:50 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Harry Potter wrote:

> I was also toying aroung with

> creating my own C compilers: one cross-platform and one on and for each of

> several 6502 targets. The cross-platform one has a nasty bug to fix

> before I continue, and the others never got off the ground. I even want

> to create a UPL/Quetzalcoatl-like compiler, but I'm just thinking about

> it. BTW, I plan the cross-platform C compiler to have alot of

> optimizations and tools to make code beter and more efficient. What do

> you think?


seriously? i think that you didnt actually ever create anything that even
vaguely resembles a working C compiler, native or not.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

The day Microsoft creates a product that doesn't suck is the day they make
vacuum cleaners.
Re: Other C64/128 C compilers? [message #37233 is a reply to message #36907] Fri, 15 February 2013 01:53 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
paskali wrote:

> Groepaz <groepaz@gmx.net> wrote:

>> it also exists as a crosscompiler for the c64, see

>> http://www.aztecmuseum.ca/

>>

>> however, these days there really is little reason to use any other

>> compiler than cc65 (unless you insist on using an old historic compiler

>> ofcourse). they all produce far worse code, have a lot of bugs, are slow,

>> have very incomplete libraries, usually dont support any form of half

>> modern C standard, etc etc.

>>

> The best way to program for c64 is assembly on c64. The native c compilers

> may be a good choice to avoid basic, if anyone does not want (or does not

> know) to use assembly.


i wouldnt say that assembly is always the best way - actually cc65 is good
enough for a lot of stuff - there is little reason to write something like a
wordprocessor or a copy program completely in assembly, when you could do
95% of it using C easily.

as for native compilers, i would generally advice against them these days
for the reasons mentioned. it will save you a lot of frustration if you dont
have to deal with each compilers different strange quirks and problems. IF
it has to be a native compiler running on c64, i would recommend using a
pascal compiler instead - they typically produce better code and have less
funny bugs.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

Das Blockieren oder Filtern bestimmter Internet-Inhalte ist für die
Europäische Union völlig inakzeptabel.
<Viviane Reding, EU-Medienkommissarin, geschrieben ins Stammbuch der
chinesischen Regierung im Juni 2009>
Re: Other C64/128 C compilers? [message #37268 is a reply to message #37233] Fri, 15 February 2013 10:20 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
Groepaz: It is true that I didn't yet invent a C compiler *yet*. As of now, it has a serious bug in it that I need to work out.

I also agree that most software doesn't need assembler. Assembler is mostly good for video games and some OS and hardware/data operations.
Re: Other C64/128 C compilers? [message #209875 is a reply to message #37233] Tue, 28 May 2013 09:08 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Silver Dream !

On 2013-02-15 07:53:33 +0100, Groepaz said:

> as for native compilers, i would generally advice against them these days
> for the reasons mentioned. it will save you a lot of frustration if you dont
> have to deal with each compilers different strange quirks and problems. IF
> it has to be a native compiler running on c64, i would recommend using a
> pascal compiler instead - they typically produce better code and have less
> funny bugs.

Which one would you recommend in the first place?

--
SD!
Re: Other C64/128 C compilers? [message #209877 is a reply to message #209875] Tue, 28 May 2013 11:32 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
My main reason for using a native compiler is nostalgia. I just think it fun to work on the original equipment--or at least emulators of such. That's it! ;) What do you think?
Re: Other C64/128 C compilers? [message #209879 is a reply to message #209877] Tue, 28 May 2013 20:37 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Harry Potter" <rose.joseph12@yahoo.com> wrote:

> What do you think?

http://en.wikipedia.org/wiki/Cross_compiler


http://en.wikipedia.org/wiki/Aztec_C

A vintage C Cross-Compiler with many examples ... an old but functional K&R
compiler in the flavour of the day that targets old but functional systems.
Even then, the C64 was too slow for native mode development. Pascal was
wirthy enough shake the tuition from the pockets of rich parents, but when
we were offered their kids in the work place we politely refused unless they
could demonstrate C and Assembly language skills....

Manx Aztec C65
Version 1.06e
Target: Commodore 64 6502 Native Code
Target OS: Commodore 64 (C64) BASIC 2 operating system
Compiler: C II Vers. 1.05h 6502 (C) 1982, 1983 by Manx Software Systems

MS-DOS cross-development environment for 8086 and compatible computers
Preconfigured for Windows XP

With several samples, projects, and a production example.
With an additional link library for sound and graphics etc.
With many original related custom tools for including source code

Here's a link to get it:

http://www.aztecmuseum.ca/

And here's another few to show you what it can do (if you are someone who
can demonstrate C and Assembly language skills and who understands that
performance is not tied to the metrics of speed and size and modern syntax,
or sadly we would not be interested in the past in the first place... just
modern compilers):

http://www.c64classics.ca/
http://www.appleoldies.ca/
http://www.cpm8680.com/

Aztec C is for folks who want to connect with the past.

There is at least one other cross-compiler available for the 6502 machines
including the C64 and the Apple II, but the environment is too modern to
provide a genuine vintage experience...

That is just what I think (thanks for asking).

All the best,

Bill
Re: Other C64/128 C compilers? [message #209880 is a reply to message #209879] Wed, 29 May 2013 01:04 Go to previous messageGo to next message
Hg is currently offline  Hg
Messages: 162
Registered: January 2012
Karma: 0
Senior Member
The situation may have changed now but the last time I checked almost
every major software package for Intel compatible systems was written
in C or C++.
I guess it's extremely unlikely though I was wondering if any
commercial software written in C was released for the 64/128 back
in the day?

--
T
Re: Other C64/128 C compilers? [message #209881 is a reply to message #209880] Wed, 29 May 2013 06:58 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Hg" <Hg@Hg.Hg> wrote:

> I guess it's extremely unlikely though I was wondering if any commercial
> software written in C was released for the 64/128 back in the day?

I thought back then that most major C64 applications were written in
assembly language but I haven't thought much about it since. I have no
proof but I doubt if many were written using C.

For my part, I resurrected the Aztec CII C64 Cross-compiler for the fun of
"pretending" I was an MS-DOS C developer back in the early '80's writing
programs for the Commodore 64. But I really doubt that many copies of the
Aztec C compiler for the Commodore 64 were sold...

Regardless, while this "resurrection" was done for a rather simplistic
reason, I had great fun doing so and highly recommend the experience of
using this old compiler for anyone who can write in C and Assembler. You
might even call doing so playing a computer game called "C64 C
Programmer"... great fun as I say:)

I really wish I had more Aztec C compilers set-up for the Commdore 64 to add
to my museum.

Bill
Re: Other C64/128 C compilers? [message #209882 is a reply to message #209879] Wed, 29 May 2013 09:14 Go to previous messageGo to next message
Harry Potter is currently offline  Harry Potter
Messages: 1304
Registered: March 2012
Karma: 0
Senior Member
I once actually tried Aztec C/C64. However, a simple Hello, World application took ~11k. For that reason, I stopped using it. Right now, I use cc65 instead. I am currently "working" on a new cross-platform C compiler to handle the pitfalls with cc65. I'd also like to try out *native* compilers for CBM and Apple 2 targets. Thank you for responding.
Re: Other C64/128 C compilers? [message #209883 is a reply to message #209880] Wed, 29 May 2013 13:12 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Hg wrote:

> The situation may have changed now but the last time I checked almost
> every major software package for Intel compatible systems was written
> in C or C++.
> I guess it's extremely unlikely though I was wondering if any
> commercial software written in C was released for the 64/128 back
> in the day?

C and pascal were both used, mostly for wordprocessor or database type of
applications. much more often you can find compiled basic though :)

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

Love conquers all except poverty and toothache.
<Mae West>
Re: Other C64/128 C compilers? [message #209884 is a reply to message #209875] Wed, 29 May 2013 13:14 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Silver Dream ! wrote:

> On 2013-02-15 07:53:33 +0100, Groepaz said:
>
>> as for native compilers, i would generally advice against them these days
>> for the reasons mentioned. it will save you a lot of frustration if you
>> dont have to deal with each compilers different strange quirks and
>> problems. IF it has to be a native compiler running on c64, i would
>> recommend using a pascal compiler instead - they typically produce better
>> code and have less funny bugs.
>
> Which one would you recommend in the first place?

it was like 1988 that i last used one, so.... uhm =) not sure if i'd want to
recommend any specific one. i'd probably pick the one that comes with a lot
of documentation and c64 specific examples =)

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

If you are not paying for it, you are not the customer. You are the product
being sold.
Re: Other C64/128 C compilers? [message #209885 is a reply to message #209882] Wed, 29 May 2013 14:33 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Harry Potter" <rose.joseph12@yahoo.com> wrote:
> I once actually tried Aztec C/C64. However, a simple Hello, World
> application took ~11k.

So what did a full-blown application with overlays take? Or did you not work
your way through the examples and full-blown programs that I provided with
the compiler? If all you are looking at is program size then use machine
code... C is not for you.

> For that reason, I stopped using it.

You never really used it anyway Joseph. You just installed it as far as I
know and then wrote maybe a line or two of code. I can't really call that
using the compiler. To me, using a compiler takes quite a block of time...
something like what I did. About a year or sdo of man-days for an expert
programmer. To do anything less is not taken seriously by people like me who
actually work through a machine and exercise it with all sorts of fun stuff
to see what we can do.

> Right now, I use cc65 instead.

How is that going?

> I am currently "working" on a new cross-platform C compiler to handle the
> pitfalls with cc65.

I don't think cc65 has pitfalls. It writes tight small code but it's really
a modern compiler and not old-fashioned at all. That's one of my reasons for
not bothering much with it. When I did bother with it it was on the Apple
IIe, and it worked flawlessly for me.

I am aware of course that you had issues with mapping of the arrow keys on
the Apple, but that matter could have been resolved if the maintainers had
paid attention to you I think. Unfortunately (although I agree that cc65 has
a bug that you found) it was hardly a serious bug and since cc65 is
primarily a C64 phenomenom an Apple II bug doesn't matter much... I haven't
seen many cc65 on the Apple II except by a handful of people who seem to
really know how to use the compiler, or so it seems The fact that the
keyboard bug doesn't bother them says something, but I don't know what.
Maybe they don't write applications that use arrow keys. But even old
compilers have bugs, and we just work around them, so maybe they work around
the chr$127 issue...

> I'd also like to try out *native* compilers for CBM and Apple 2 targets.

If it's native mode C compilers in ProDOS 8 on the Apple IIe which ones
would you try? Aztec C 3.2b comes to mind.

If it's native mode C compilers in DOS 3.3 on the Apple IIe which ones would
you try? Aztec CII comes to mind.

I assume you would use Power C on the C64.

Would you use Orca C on the Apple GS? That's a pretty nice compiler, but you
still need to buy a licenced copy... would you pay for a licenced copy?

Would you also code for CP/M 80 on the Apple II or C64? If so which
compilers would you try? Aztec C comes to mind.

Like I said, the C64 and Apple II are both to much trouble when bothering
with native mode compilers... they always were for me which is why I bought
Aztec C's MS-DOS cross-compilers when I actually got paid for programming on
those old platforms.

Besides the fact that they ran quickly in MS-DOS, my reason for selecting
them was belive it or not small code size, as well as good documentation.
Also because I had good success with Aztec C in MS-DOS, but the price was
high back then. Around $1000 Canadian per compiler I seem to remember.

Bill
Re: Other C64/128 C compilers? [message #209886 is a reply to message #209885] Wed, 29 May 2013 14:54 Go to previous messageGo to next message
Peter Schepers is currently offline  Peter Schepers
Messages: 23
Registered: January 2013
Karma: 0
Junior Member
> So what did a full-blown application with overlays take? Or did you not work
> your way through the examples and full-blown programs that I provided with
> the compiler? If all you are looking at is program size then use machine
> code... C is not for you.

I recall years ago when I was experimenting with the various BASIC
compilers to see what they couldn't do and their relative speeds. Each
one had specific limitations, but also had specific overhead, i.e. the
default libraries supplied were always the same size and sometimes quite
large. Once your program was large enough, the compiled version was
smaller than your source. Sounds like the overhead for C is similar. If
you have a large enough project, the overhead might not be so bad.

Personally, assembler was always way more fun.

PS
Re: Other C64/128 C compilers? [message #209887 is a reply to message #209884] Wed, 29 May 2013 15:29 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: SD!

On 2013-05-29 19:14:40 +0200, Groepaz said:

>>> as for native compilers, i would generally advice against them these days
>>> for the reasons mentioned. it will save you a lot of frustration if you
>>> dont have to deal with each compilers different strange quirks and
>>> problems. IF it has to be a native compiler running on c64, i would
>>> recommend using a pascal compiler instead - they typically produce better
>>> code and have less funny bugs.
>>
>> Which one would you recommend in the first place?
>
> it was like 1988 that i last used one, so.... uhm =) not sure if i'd want to
> recommend any specific one. i'd probably pick the one that comes with a lot
> of documentation and c64 specific examples =)

I honestly asked because I remeber seeing only one, which didn't really
work so if you (or anyone) have some recommendations for a well working
one - that would be interesting to have a look at.

--
SD!
Re: Other C64/128 C compilers? [message #209888 is a reply to message #209882] Wed, 29 May 2013 15:34 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: SD!

On 2013-05-29 15:14:38 +0200, Harry Potter said:

> I am currently "working" on a new cross-platform C compiler

Why did you use quotation marks.. aa... never mind ;-)

> to handle the pitfalls with cc65.

Like the lack of float types?

--
SD!
Re: Other C64/128 C compilers? [message #209889 is a reply to message #209886] Wed, 29 May 2013 19:05 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Peter Schepers" <schepers@uwaterloo.ca> wrote:

> I recall years ago when I was experimenting with the various BASIC
> compilers to see what they couldn't do and their relative speeds.

Aztec CII's cross-compiler for the C64 runs slower than CC65 which is a
modern compiler. However considering that Aztec CII is 30 years old and CC65
is a modern compiler, running at 70-80% of the speed of CC65 is not bad.

Aztec C was consistent across platforms including CP/M 80 and CP/M 86, the
Apple II and MS-DOS in 1982-83. They did pretty well being one of the
first... and provided an environmnet that their programmers expected in
those Pre-ANSI/ISO years. It's much easier to improve on something than to
do it in the first place, but more importantly it is much harder to provide
a run-time that provides features like a floating point library and math
functions and overlay support when you are among the first.

> Each one had specific limitations, but also had specific overhead, i.e.
> the default libraries supplied were always the same size and sometimes
> quite large. Once your program was large enough, the compiled version was
> smaller than your source. Sounds like the overhead for C is similar.

Not exactly, but that is almost the idea. Or it was back then.

> Personally, assembler was always way more fun.

I enjoyed 8086 assembler better because I also had segment registers. Aztec
C allows inline assembler and user registers and the whole-meal deal when it
comes to writing. If one enjoys writing it is a pleasure and a challenge
both.

I don't care a fig if the program is a little larger than a modern compiler.
I just like it better. Others might not prefer the challenge and if that's
the case then there are lots of modern compilers around for lots of
platforms and easy writing. But since I am a C with Assembly programmer I
get a little sick of writing in modern languages after essentially working
in just about every other modern thing for so many years... it's fun to use
the stuff one started with.

Bill
Re: Other C64/128 C compilers? [message #209890 is a reply to message #209889] Thu, 30 May 2013 04:49 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Bill Buckels wrote:

>
> "Peter Schepers" <schepers@uwaterloo.ca> wrote:
>
>> I recall years ago when I was experimenting with the various BASIC
>> compilers to see what they couldn't do and their relative speeds.
>
> Aztec CII's cross-compiler for the C64 runs slower than CC65 which is a
> modern compiler. However considering that Aztec CII is 30 years old and
> CC65 is a modern compiler, running at 70-80% of the speed of CC65 is not
> bad.

small-c (http://en.wikipedia.org/wiki/Small-C) is actually of similar age as
aztec-c (http://en.wikipedia.org/wiki/Aztec_C). it is also anything but a
modern compiler, even compared to LCC its software design looks like from
stoneage (it does not even build an internal parse tree, but generates code
on the fly - like all "first generation" c compilers do). so that point is
pretty moot.

what makes cc65 notably different from aztec-c is that it actually is more
or less standard compliant, and comes with a more or less complete and
standard compliant libc. that means you can actually write c code as you are
used from other platforms and then expect the compiler to produce a working
program - without needing any compiler specific hacks and workarounds.
aztec-c on the other hand is a challange for its awkward k&r dialect alone,
and if you are not familiar with the compiler and/or its support libraries
(which are not really libc compatible) then quite a bunch of pitfalls are
waiting for you. and at the end of the day the code it spits out is both
larger and slower than what cc65 gives ya.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

Der gesunde Menschenverstand ist eine Sammlung von Vorurteilen, die man bis
zum achtzehnten Lebensjahr erworben hat.
<Albert Einstein>
Re: Other C64/128 C compilers? [message #209892 is a reply to message #209890] Fri, 31 May 2013 23:24 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Groepaz" <groepaz@gmx.net> wrote:

> aztec-c on the other hand is a challange for its awkward k&r dialect alone

No question it is a challenge... but I would take you to task on
characterizing K&R as awkward... I think it's fun. Nostalgic even. Some
folks prefer a challenge.

But keep in mind that I wrote a whole load of non-trivial library routines
and lots of programs with Aztec C without blinking an eye so perhaps I am no
judge of difficulty for the average joe.

> and if you are not familiar with the compiler and/or its support libraries
> (which are not really libc compatible) then quite a bunch of pitfalls are
> waiting for you.

From my perspective if you aren't much of a C programmer then that is true.
This stuff about libc I don't get either... so what! All I know is that I
put the C64 Aztec C Cross-Compiler and my libraries and utilities together
from a damaged disk-set in about a 3 month period after never looking at it
before.

> and at the end of the day the code it spits out is both larger and slower
> than what cc65 gives ya.

I can't disagree with Apples and Bananas. But with Vice in Warp Mode and
virtually unlimited disk space on my Windows toybox or an SD on my C64 it
really doesn't much matter to me personally. It depends what a guy enjoys...
making some old compiler work is fun, but I do agree it's not for everyone.
Just those of us who enjoy it and can do it.

I realize of course that you can but don't enjoy the old stuff the way I do.

Bill
Re: Other C64/128 C compilers? [message #209907 is a reply to message #209892] Sun, 02 June 2013 09:26 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Bill Buckels wrote:
>> and if you are not familiar with the compiler and/or its support
>> libraries (which are not really libc compatible) then quite a bunch of
>> pitfalls are waiting for you.
>
> From my perspective if you aren't much of a C programmer then that is
> true. This stuff about libc I don't get either... so what!

bolloks. especially if you are much of a c-programmer, then you are familiar
with the C standard, and the standard set of libraries (such as libc) - and
you'll expect them to work in a certain specific way.

however when using stoneage k&r compiler like aztec-c, all that knowledge is
completely useless at best. more likely it will even get in the way, because
you'll spend a lot of time with finding out why a certain function doesnt do
what it is supposed to do, or with finding out wth it is really doing
instead exactly. (at this point i have more than once ended up writing my
own set of more standard compliant libraries - something that most people
are not willing to do =P)

>> and at the end of the day the code it spits out is both larger and slower
>> than what cc65 gives ya.
>
> I can't disagree with Apples and Bananas. But with Vice in Warp Mode and
> virtually unlimited disk space on my Windows toybox or an SD on my C64 it
> really doesn't much matter to me personally. It depends what a guy
> enjoys... making some old compiler work is fun, but I do agree it's not
> for everyone. Just those of us who enjoy it and can do it.
>
> I realize of course that you can but don't enjoy the old stuff the way I
> do.

well, i find it pretty ridiculous to write programs with an awkward
compiler, get huge bloated code, and then run it in vice in warpmode. if i
write programs for the c64, i want to use them on a real c64 ofcourse. and i
dont care much how the compiler is called or how old it is at all - the one
that produces the best result wins :)

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

In C++, friends can access each others' private members.
Re: Other C64/128 C compilers? [message #209909 is a reply to message #209907] Sun, 02 June 2013 23:05 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"Groepaz" <groepaz@gmx.net> wrote:

> bolloks.

Not at all...

> especially if you are much of a c-programmer, then you are familiar with
> the C standard, and the standard set of libraries (such as libc) - and
> you'll expect them to work in a certain specific way.

Which C Standard? In my 30 years of writing C programs and using hundreds of
compilers and versions in many Unises and Windows and other platforms, I
have
experienced many standards and still do. I have a pretty fair idea what it
takes to be much of a C programmer, and I believe being familiar with your
tools is more important by far than expecting your tools to be perfect and
to some standard or other.

In a perfect world I might expect the expected. Granted, I would expect
compilers to work the way the compiler manual described them, and within the
limitations of the environment and with consideration to the vintage of the
compiler.

> however when using stoneage k&r compiler like aztec-c, all that knowledge
> is completely useless at best.

If you were a newbie I could overlook a statement like that. Standards are
hardly knowledge... just information. If standards is all a programmer has
going for him, then delivering pizza for a living is a good career
alternative. As for stoneage, the C64 and Apple II both predate Aztec C as
does the 6502... so basically what you are saying is it's fine to write code
for a stomeage computer but it's not fine to use a stoneage compiler to do
so... so then where's the fun. I may as well go back to writing Qt
applications for some linux or another... but then I'd choose .NET
applications in Windows anytime for shlock-code! But we're talking about fun
here, and nostalgia!

> more likely it will even get in the way, because you'll spend a lot of
> time with finding out why a certain function doesnt do what it is supposed
> to do, or with finding out wth it is really doing instead exactly. (at
> this point i have more than once ended up writing my own set of more
> standard compliant libraries - something that most people are not willing
> to do =P)

I would rather spend my time writing new libraries than being hung-up on
things being perfect and expecting libc... I can't speak for most people.

> well, i find it pretty ridiculous to write programs with an awkward
> compiler, get huge bloated code, and then run it in vice in warpmode. if i
> write programs for the c64, i want to use them on a real c64 ofcourse. and
> i dont care much how the compiler is called or how old it is at all - the
> one that produces the best result wins :)

I find it pretty ridiculous to talk about winning and about marginal speed
increases on an old computer like my beloved Apples and C64 and C128.

I have already pointed-out that what is awkward to you is awkward to you.
There is nothing wrong with cc65 if that's what you like. I am not going to
sling-mud at it. I find it perfectly usuable, not challenging at all really.
To me it is featureless by comparison to Aztec C and devoid of historical
significance as well. It could be 100% faster and not just 30% faster and
I'd still prefer Aztec C.

Each to their own.

Bill
Re: Other C64/128 C compilers? [message #209913 is a reply to message #209909] Mon, 03 June 2013 06:46 Go to previous messageGo to next message
Groepaz is currently offline  Groepaz
Messages: 640
Registered: December 2011
Karma: 0
Senior Member
Bill Buckels wrote:
>> especially if you are much of a c-programmer, then you are familiar with
>> the C standard, and the standard set of libraries (such as libc) - and
>> you'll expect them to work in a certain specific way.
>
> Which C Standard? In my 30 years of writing C programs and using hundreds
> of compilers and versions in many Unises and Windows and other platforms,
> I have
> experienced many standards and still do.

start with *ANY* standard. K&R isnt really standardized at all, every K&R
compiler is slightly different. thats why they invented ansi-c afterall :)

> I have a pretty fair idea what it
> takes to be much of a C programmer, and I believe being familiar with your
> tools is more important by far than expecting your tools to be perfect and
> to some standard or other.

generally i agree. however, one of the big advantage of using a C compiler
is that they all work pretty much the same.

> If standards is all a programmer has
> going for him, then delivering pizza for a living is a good career
> alternative. As for stoneage, the C64 and Apple II both predate Aztec C as
> does the 6502... so basically what you are saying is it's fine to write
> code for a stomeage computer but it's not fine to use a stoneage compiler
> to do so... so then where's the fun.

i havent said anything like that. if for you the fun lies in hunting down
bugs caused by quirks of K&R, go for it. for me however the fun is in
writing the actual program, and i'd rather take a tool that works as
expected to accomplish that task.

> I would rather spend my time writing new libraries than being hung-up on
> things being perfect and expecting libc... I can't speak for most people.

youd be surprised, most people would rather take existing libraries that
work exactly as advertised. most people dont even want to know how the
compiler works. really.

> I find it pretty ridiculous to talk about winning and about marginal speed
> increases on an old computer like my beloved Apples and C64 and C128.

its not marginal speed increases. its factor 2 to 10, depending on the
actual task. (if aztec-c would actually be capable compiling the bytebench
or dhrystone tests, maybe you could see it =P)

however, much more importantly: the codesize is almost always less. and
memory is very valueable when doing high level stuff on an 8bit micro.

> To me it is featureless by comparison to Aztec C

featureless? the only thing i can see there is the lack of floats. which
isnt really a problem since on 8bit micro you'd want to use fixedpoint
arithmetics for speed reasons most of the time anyway.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

Bei Fragen zu diesem Vorgang wenden Sie sich bitte an the administrator of
that system
Re: Other C64/128 C compilers? [message #209915 is a reply to message #209909] Mon, 03 June 2013 08:48 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: SD!

On 2013-06-03 05:05:52 +0200, Bill Buckels said:

> Which C Standard?

ISO/IEC.. with some parts obviously missing.

> If standards is all a programmer has
> going for him, then delivering pizza for a living is a good career
> alternative.

Meaning if I don't want to reimplement e.g. stdio with every project I
should rather buy a scooter.

> does the 6502... so basically what you are saying is it's fine to write code
> for a stomeage computer but it's not fine to use a stoneage compiler to do
> so... so then where's the fun.

In compiling and making run a modern standard C code on an old machine
without rewriting things from scratch for example.
In writing new, modern standard C code for the old machine and seeing
it actually work (!) for another example.

--
SD!
Re: Other C64/128 C compilers? [message #209916 is a reply to message #209913] Mon, 03 June 2013 08:51 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: SD!

On 2013-06-03 12:46:31 +0200, Groepaz said:


>> To me it is featureless by comparison to Aztec C
>
> featureless? the only thing i can see there is the lack of floats.

Yup - that one burns. I think "we" really should move our butts and
implement those, one - preferably not too distant - day.

--
SD!
Re: Other C64/128 C compilers? [message #209923 is a reply to message #209915] Mon, 03 June 2013 23:37 Go to previous messageGo to next message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"SD!" <silverdr@wfmh.org.pl.remove.it> wrote:

> In compiling and making run a modern standard C code on an old machine
> without rewriting things from scratch for example.

In Aztec C one does not need to rewrite things from scratch. Perhaps you
should visit the Aztec C Website and the Commodore 64 Classics website and
see for yourself. Perhaps not. Suit yourself...

If you do, also have a look at the Apple II version of Aztec C.

It is amazing that cc65 on the Apple II is, as far as I know, not even
capable of reading or writing files in DOS 3.3, nor as far as I know is it
acpable of even creating a standard SYS program in ProDOS 8. It is not just
floating point support that cc65 lacks on that other platform.

As far as DHRYSTONE, I have those results for v1.1 for Aztec C on the Apple
II. So alot of what has been said here I take as purely converstational...

> In writing new, modern standard C code for the old machine and seeing it
> actually work (!) for another example.

Aztec C's code works fine. Or where did those programs come from?

http://www.aztecmuseum.ca/
http://www.c64classics.ca/
http://www.appleoldies.ca/
http://www.cpm8680.com/

Bill
Re: Other C64/128 C compilers? [message #209924 is a reply to message #209916] Mon, 03 June 2013 23:48 Go to previous messageGo to previous message
Bill Buckels is currently offline  Bill Buckels
Messages: 1418
Registered: November 2012
Karma: 0
Senior Member
"SD!" <silverdr@wfmh.org.pl.remove.it> wrote:
..
> Yup - that one burns.

Obviously there seems not be room for a different opinion here, even from
someone who wrote in C for a living for 30 years. It's not meant to burn...
it's another point of view.

> I think "we" really should move our butts and implement those, one -
> preferably not too distant - day.

On which platforms? To what precision and will you implement floats only or
doubles as well. What about the math library... best have a look at Aztec C
before you start... it might be more work than what it's worth to you.

Bill
Pages (2): [1  2    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Commodore/Amiga at Bay Area Maker Faire, May 18-19
Next Topic: FA: Commodore PET 4032 and SX-64
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Mar 28 13:27:44 EDT 2024

Total time taken to generate the page: 0.61583 seconds