6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 1:51 am

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Jan 09, 2014 11:36 am 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
hi guys
i am toying with 65C02 emulator and i wander if i can use (or modify) the c65's tools chain in order to compiler for 68hc11.
I don't know exactly which differences between 65202 and 68hc11 because i have learned only the last one.

is it possible to use c65 to compile for hc11 ? i know there is gcc-hc11, but … i do not like gcc at all.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 8:14 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
legacy:

ImageCraft has an offer at the moment that provides access for a 30-day period to its HC11 C compiler development toolset: www.imagecraft.com. If you find it useful, then its price may be in your price range.

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 9:57 pm 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
yes but i'd like to have an hc11 c compiler on my PowerPC, too, so i need sources in order to recompile, unfortunately i do not like gcc at all.

What about my question: how similar is 6811 to 6502 ? they both be compatible with 6800, so … i wander


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 10:10 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
legacy wrote:
... unfortunately i do not like gcc at all.

I'm sorry if the question offends you, but could you tell us why?
Quote:
What about my question: how similar is 6811 to 6502 ? they both be compatible with 6800, so … i wander

They are related, but rather distantly. It would take significant effort to modify an assembler, and quite a bit more to modify a compiler made for one to work for the other. I'm not saying that it's impossible, just difficult, especially for a casual hobbyist like me.

Mike


Last edited by barrym95838 on Thu Jan 09, 2014 10:15 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 10:15 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
There are plenty of differences between the 6502 and the 68HC11 that you would definitely have to modify cc65 to compile for the 'HC11. There were moderate (not radical, but not trivial either) differences between the 6800's and the 6502's programming models and instruction sets and addressing modes; and the the 6800's upgrade path was the 6809 while the 6502's was the 65816. I think the 'HC11 microcontroller has more-or-less a 6809 processor, right?

My exposure to the 'HC11 family was over 20 years ago when I was searching for a microcontroller to put in a product. In the early stages of development, I considered several different ones. Many had severe limitations for our application. National, who made the COP800 family, actually told us that we basically were too small for them to be interested in our business. We settled on one of the Motorola 68HC11's. Unfortunately the version we needed with EEPROM and lots of EPROM was on allocation (because of the automotive industry) and was not easy to buy. As it ended up, we just went back to a discrete 65c02 computer on its own board. Our cost for parts and labor was approximately what the HC11 was going to cost anyway-- it just took a little more room. It did the job beautifully.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 11:40 pm 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
barrym95838 wrote:
legacy wrote:
... unfortunately i do not like gcc at all.

I'm sorry if the question offends you, but could you tell us why?


the hc11 branch of gcc is broken in the newer branches, and it is is very difficult to be configured and compiled, very complicated, especially if you want a PowerPC host instead of x86/PC as in my case: i need sources in order to compiler the c11 compiler on a linux/ppc host.

Also, gcc-11 is very bloated about the asm code it generates from C: i tried Cosmic-C/trial (which compile for a maximum of 4Kbyte, with bigger final app it stops to work and you need to buy a license) and the C-to-ASM code i have seen is prettier, less bloated than the one from gcc11 -S.


Last edited by legacy on Thu Jan 09, 2014 11:56 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2014 11:43 pm 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
GARTHWILSON wrote:
I think the 'HC11 microcontroller has more-or-less a 6809 processor, right?


unfortunately i do not know 6502 at all, never heard about it till 4 days ago when i read about c65, which appears to me to be very pretty and easy C compiler!

I do not know 6502 but i know 68hc11 very well, i mean a lot of project done, and i am still using it, and i have been studying 6809 for a soft core project, such like fpga around spartan3-500 implementation, just for fun: so … i can say "yes" :mrgreen:


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 1:20 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Quote:
unfortunately i do not know 6502 at all, never heard about it till 4 days ago

It may be the most-produced and best-documented processor of all time. Its original version came out in 1975, and was the processor used in many home computers, including in the 6510 in the Commodore 64 which was produced for over 11 years from the early 1980's to the early 1990's and remains the highest-selling computer of all time, having sold somewhere between 12.5 and 17 million units. Approximately 10,000 commercial software titles were made for the Commodore 64 including development tools, office productivity applications, and games. Other popular 6502 home and hobby computers that come to mind are the Apple II, Atari, KIM-1, SYM-1, and AIM-65, and I'm sure there are many more I'm forgetting.

Today the 6502 is at the heart of many custom ICs that go into automotive, consumer, and even life-support electronics at a rate of hundreds of millions of units per year. The IP holder is Western Design Center which makes most of its income by licensing the IP, not selling chips. Of the chips it does sell, the speed rating is never less than 14MHz, although there are 65c02 cores in custom ICs running over 200MHz, or approximately 50 MIPS.

The CMOS 6502, ie, the 65c02, is not just a lower-power & higher-speed version. It has more instructions and addressing modes, more signal pins for facilitating certain types of designs (like multiprocessor and DMA), and fixed all the bugs and quirks of the earlier NMOS version. The natural upward progression is the 65816 which further increases the number of instructions and addressing modes and can directly address 16 megabytes of memory map. The 65816 is much better suited than the 6502 for things like multitasking, multithreading, relocatable code, and of course large data spaces, and is much more efficient when 16-bit (or larger) quantities are constantly handled.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 2:09 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
legacy wrote:
unfortunately i do not know 6502 at all, never heard about it till 4 days ago when i read about c65, which appears to me to be very pretty and easy C compiler!

Er, your 'evil twin' must have joined this forum 13 months ago then, and mingled with the well-respected Arlet, BDD, and others!

Mike


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 6:54 am 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 64
Location: Sunny So Cal
If you felt like a little project, Small-C should target 68hc11 very nicely, if someone hasn't done it already.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 7:13 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
I plugged the phrase Small-C should target 68hc11 into my evil search engine, and this was the first link.

Mike


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 8:34 am 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
small c ? Yeah, it may be good, is there any repo/branch with the compiler's sources ?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 8:54 am 
Offline

Joined: Sat Dec 08, 2012 8:29 pm
Posts: 62
barrym95838 wrote:
Er, your 'evil twin' must have joined this forum 13 months ago


Never seen 6502'ISA before, never analyzed or played with it, 13 months ago i was looking for 6809's info (for the softcore in the fpga project) and i was considering 6502 as a 6800 clone, which is not correct because they are related but not equivalent as i am learning now.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 4:41 pm 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 64
Location: Sunny So Cal
Barry, he's on PowerPC, so that link won't help him (I don't see source).

legacy, try any of the links here: http://www.cpm.z80.de/small_c.html
The "Small C for the Unix platform" appears to work on my G5. However, I eventually abandoned it to work on an interpreted runtime, so I can't vouch for it in great detail. My bet is, someone out there has done this work already, but if you can't find it, Small C is pretty straightforward to retarget.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 10, 2014 11:10 pm 
Offline

Joined: Tue Jan 07, 2014 8:40 am
Posts: 91
GARTHWILSON wrote:
I think the 'HC11 microcontroller has more-or-less a 6809 processor, right?


Alas, no. The 6809 was a wonderful upgrade of the 6800, with new instructions, registers, and addressing modes. When Motorola introduced the 'HC11 they "downgraded" back to the basic 6800 instruction set architecture. The more recent 'HC12 did include many of the improvements of the 6809.

_________________
Because there are never enough Forth implementations: http://www.camelforth.com


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: