[comp.lang.c] 6502 Code Generating Compiler

palmerc@ingr.com (Chris Palmer) (03/21/90)

Hi, I'm looking for a compiler (preferably 'c') that generateds 6502/6510
assembly language.  I really don't care what language it is.  I am working
on a Commodore 64 programming project for my wife, and I don't want to spend
big bucks buying a compiler.  I writing right now in assembly language using  
a public domain 6502 assembler, which works great, but I would rather have
a higher level language to work with.

In conclusion,
WANTED:		A compiler that generates 6502/6510 assembly language.

		Should be written in "c" (or pascal).

		If lex or yacc was used, I would like the grammer files
		so that I can add commands for graphics and sound.


-- 
|  Christopher M. Palmer
/  Intergraph Corporation
\  Internet: b14!abulafia!palmerc@ingr.com
|  UUCP    : ...uunet!ingr!b14!abulafia!palmerc
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.

scott@max.u.washington.edu (03/23/90)

In article <1990Mar21.154355.3310@esegue.segue.boston.ma.us>, palmerc@ingr.com (Chris Palmer) writes:
> Hi, I'm looking for a compiler (preferably 'c') that generateds 6502/6510
> assembly language.  I really don't care what language it is.  I am working
> on a Commodore 64 programming project for my wife, and I don't want to spend
> big bucks buying a compiler.  I writing right now in assembly language using
> a public domain 6502 assembler, which works great, but I would rather have
> a higher level language to work with.
>
> In conclusion,
> WANTED:               A compiler that generates 6502/6510 assembly language.
 
 
Your request is rather unusual one (or it is just that I misunderstood it).
If you are looking for a compiler (of any language) that generates assembly
language, well i haven't see any that does that. All the compilers that
I have seen generates runnable machine language. I guess
you are looking for a compiler that generates assembly language inorder
to study the assembly codes generated and incorporate them into the
assembly-language-program that you were already working on, well... this
this wouldn't be a good idea (unless what you were trying to do is just
too complex to program it directly in assembly language) since the
assembly code generated by a compiler (if there is such compiler) is hard
to follow and inefficient.
Having said all these..... although there isn't a compiler for the C64
(if not for all computers) that generates assembly language, there is
a way to do what (I think) you want to do.
Since there isn't a compiler that generates assembly language directly,
what we need is another program that can generate assembly language from the
machine language generated by the compiler (does this makes since :-) ).
And there is such program. It is called "codegen.sda", and it is already
available in some of the FTP-sites that support the C64. The assembly
code generated is compatible with the "mlass" assembler also available
from the same FTP-site.
 
Having said all, all these....If you were just tired of programming in
tidious assembly language and were merely looking for a good PD complier
for the C64, well I can tell you of two and they are already
available in the FTP-sites. One is called "BlazinForth". This is a fully
impremented Forth-83 (or was it 87?) compiler. Another one is "Blitz". This
a compiler for BASIC.
For C and Pascal compilers, I only know of commercial ones, and they
cost around $45.
 
 
I hope this was of help......
 
Sincerely,
Scott K. Stephen
 

dfoster@jarthur.Claremont.EDU (Derek R. Foster) (03/25/90)

In article <13494.2609101e@max.u.washington.edu> scott@max.u.washington.edu writes:
>In article <1990Mar21.154355.3310@esegue.segue.boston.ma.us>, palmerc@ingr.com (Chris Palmer) writes:
>>Hi, I'm looking for a compiler (preferably 'c') that generateds 6502/6510
>>assembly language.  I really don't care what language it is.  I am working
> 
>Your request is rather unusual one (or it is just that I misunderstood it).
>If you are looking for a compiler (of any language) that generates assembly
>language, well i haven't see any that does that. All the compilers that
>I have seen generates runnable machine language.

This probably won't help the original poster much, but there certainly
do exist compilers that generate assembly code. The Turbo C
COMMAND-LINE compiler (supplied with the integrated development environment)
will do this if you ask it to. I suspect that others
will as well. The generated code is a little inefficient, yes, but that's
only a problem if you are in a tight spot as far as efficiency is
concerned. It's not all that hard to follow. To the original poster:
keep looking! There are so many different programs available for 6502
computers that SOMEBODY must have written one. This may not be the best
newsgroup to ask for that sort of info. Is there a comp.sys.c64 or something?

Derek Riippa Foster