I have some C code that I want to convert to 6502 assembly code but as a text file.
I have been told this requires a cross assembler, would CC65 be a cross assembler, or would something like this only exits with a PC or Linux.
I found Quazalcoat that was written in the early 80's for the Vic-20 will almost code in C but not sure if this software will cross assemble, which is what I need.
-Terry
C code to 6502 assembly code
Moderator: Moderators
C code to 6502 assembly code
Last edited by terry on Wed Jan 02, 2008 5:44 pm, edited 1 time in total.
Re: C code to 6502 assembly code
Do you mean machine code or assembly language?terry wrote:I have some C code that I want to convert to 6502 assembly code but as a text extension.
I'm not sure if this will do what you wan to do, but have you had a look at http://www.cc65.org/? It should compile C code to assembly language and then assemble that to get machine code.
Re: C code to 6502 assembly code
WillKemp wrote:Do you mean machine code or assembly language?terry wrote:I have some C code that I want to convert to 6502 assembly code but as a text extension.
I'm not sure if this will do what you wan to do, but have you had a look at http://www.cc65.org/? It should compile C code to assembly language and then assemble that to get machine code.
Schema responded to this message also: you can assemble back to Binary and then assemble to text, which is what I need.
terry
Re: C code to 6502 assembly code
I found out I need a cross assembler, not sure if cc65 will do this. I also found Quazalcoat which was written in early 1980 sometime then in 1996 was updated, I tried to email this guy but cannot reach him.terry wrote:WillKemp wrote:Do you mean machine code or assembly language?terry wrote:I have some C code that I want to convert to 6502 assembly code but as a text extension.
I'm not sure if this will do what you wan to do, but have you had a look at http://www.cc65.org/? It should compile C code to assembly language and then assemble that to get machine code.
Schema responded to this message also: you can assemble back to Binary and then assemble to text, which is what I need.
terry
I have another programmer that might be able to help me.
www.ffd2.com Steve is a good coder.
Thanks all.
-Terry R.
The CC65 package contains a cross assembler called ca65 (or if it is as65, I can't recall). It is considered one of the most powerful cross assemblers for 6502 processors, but also rumoured to be very complex to use for others than the cc65 compiler itself. Us others tend to stick with DASM, XA or any of the other cross assemblers, which all have slightly different syntax.
Anders Carlsson






I've been using ca65 recently (via cl65 - which, according to the docs, "...was designed as a smart frontend [for the C compiler, the assembler, etc]") and i don't find it at all complex. Before the other day, i hadn't used an assembler of any sort for over 25 years.
The documentation's very good and i can certainly recommend the cc65 package. I'm sure it's just what you're looking for.
The documentation's very good and i can certainly recommend the cc65 package. I'm sure it's just what you're looking for.