Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Programming the 6809E  (Read 2665 times)

0 Members and 1 Guest are viewing this topic.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Programming the 6809E
« on: September 20, 2013, 03:53:40 am »
No joke, any grognards around here know much about it?

There is a myriad of links, discussions, and datasheets about the 6809E but actually programming the damn thing? Not so well. I would really love to bounce some questions off of someone who actually has had programmed this at one point and not just replaced a burned out chip in their box.

I found a copy of "Inside the Dragon" which has a lot of fluff about the Dragon. I'm trying to churn through the paragraphs to get to the gold but it's a snoozer.

Found a copy of Leventhal's "6809 Assembly Language Programming" at archive.org which caught me by surprise. So I'm horking down as many 6809 books as I can find there.

I managed to find a bare compiler "AS9" which is supposedly from the same source as was released so long ago. But outside of a few byte codes, most of what I try errors out. Syntax problems I think, probably some subtle ---steaming pile of meadow muffin--- like a space here or there or something. Every other assembler I looked for leads to dead links. Bleh!

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: Programming the 6809E
« Reply #1 on: September 20, 2013, 10:12:59 am »
The 6809 was also used in the Tandy Color Computer 3 as well.  I recall throwing in a 6809E as an upgrade to the coco3 and had to run a modified OS9 Level 2 which was quite a bit faster.

There are still quite a few sites with good info on that machine so might want to look around on those as well.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #2 on: September 20, 2013, 10:53:43 am »
Y3ah, I found a couple of, what I hope, are a couple of good resources last night.

These old parsers are a pain in the ass. Discovered it was a space I included and the assembler didn't like it.

A lot of the old books seem to make certain assumptions that was common knowledge back then but are either forgotten or just transparently handled now. Or worse, nomenclature having changed over the years. An unrelated document I was looking at did all counts by bits rather than byte or word. So I spent twenty minutes trying to r3concile an 8K part with a document that said it was 64K.

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: Programming the 6809E
« Reply #3 on: September 20, 2013, 11:57:50 am »
Oops, lookin at this again.....as my memory is rusty.

Apparently I swapped a 6809e for a hitachi 6309E for that extra speed boost as it had some extra registers, etc.  Might be able to find some better docs on that one?

I never coded assembler on either, but did some C coding with it a very very long time ago.   :)

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #4 on: September 20, 2013, 02:58:30 pm »
I was wondering how you got around the clocking requirements on that one :D

I found a nice document a month or two ago that highlights the differences between the 6309 and 6809 instructions. It's really quite good. However it's sometimes hard to tell what is a legal or illegal instruction for 3ach processor. For example, I believes it shows LEAX B,Y as a valid instruction for both which the AS9 assembler balks at. Furthermore there is no byte combination in the old MC6809E documents that allows such a combination... not any that I can glean anyways.

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #5 on: September 20, 2013, 08:53:26 pm »
SavannahLion
try looking 68hc11 dev kit
it has all the info >compiler's/disasamblers..in its code set
just a start
as i looked today and everything pointed to it ?
but i did not take the time to find out why

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #6 on: September 23, 2013, 03:49:03 am »
SavannahLion
try looking 68hc11 dev kit
it has all the info >compiler's/disasamblers..in its code set
just a start
as i looked today and everything pointed to it ?
but i did not take the time to find out why

ed

I don't have too many fond memories of the 68HC11 and I certainly don't remember any of the mnemonics for it. Makes sense though, I think I read somewhere that the the 68HC11 does have code compatibility with other processors. Not sure which ones though.

On a side note:
After thinking about it for some time, I finally realized that the LEAX B,Y instruction may actually be valid but the assembler refuses it for some reason. There are three specific post-byte op codes that allow manipulation of A, B and (D) registers with X,Y,U or S registers. Third rewrite so far.  :banghead:

« Last Edit: September 23, 2013, 03:55:22 am by SavannahLion »

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: Programming the 6809E
« Reply #7 on: September 23, 2013, 03:12:40 pm »
http://www.coco3.com/community/wp-content/files/ccasm2006_2.pdf has op codes and some short example programs and other tidbits of good info......but guessing you're beyond those already.   :-\

Here's an option............if Steve Bjork is still involved in the Coco community.....ping him?  He was a 6809e god.
« Last Edit: September 23, 2013, 03:15:38 pm by spoot »

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #8 on: September 23, 2013, 04:56:37 pm »
spoot
right..:):)

but it is all 6800
this is the reason i said 68hc11
that ^^^ is the full dev kit inculding the compilers/de-compiler's
hex-c-sum/and the c+/c++/delphi/borland compilers
u can then make it into a .bin/img/.hex file
thus can then reload the nessary info to the chip in question

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #9 on: September 24, 2013, 03:22:42 am »
Oh nice. No I didn't see that. Looks like I completely overlooked the Coco. Sometimes just trying to slice through the old tomes is a bit of chore.

I promise ed12, I'll take a look at the 68HC11 package if I can find it.  :cheers:

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #10 on: September 24, 2013, 12:34:09 pm »
SavannahLion

i have the full dev kit complete with its break out board
i do think i have the s/w on floppy or back-up
so no fears i can  and will lend u a hand when u ring the bell

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #11 on: September 24, 2013, 07:24:31 pm »
I managed to work out how to get the assembler to accept LEAU B, X but it still spits out a "warning". A mildly irksome annoyance but one I can put up with for the time being.

One thing though... AS9 does absolutely nothing without flags. I was using -l to force listing but I noticed there is no binary and I have yet to see any mention in any document of building the actual binary. I haven't read the coco book yet. So I'll look when I get home tonight but I can't help but feel like I'm missing some assumption or taking some detail for granted. I suppose if worst comes to worst I can craft a script to create a binay from the listing....

Or maybe the AS9 I found is part of a much larger package? I'll track down the 68HC11 suite tonight and see if it offers up some clues.
« Last Edit: September 24, 2013, 07:26:38 pm by SavannahLion »

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #12 on: September 24, 2013, 09:17:30 pm »
let me see if this will upload for u

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #13 on: September 24, 2013, 09:19:17 pm »
now do me a fav and post a snibet of your code
u can pm if u want
but i would like to see it before i go any futher
thk's in advance

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #14 on: September 24, 2013, 09:54:11 pm »
now this is not to little u
i am sure u already seen this ?
but the x and y are made up of a-b-c-d

Internally, the HC11 instruction set is upward compatible with the 6800, with the addition of a Y index register. (Instructions using the Y register have opcodes prefixed with the byte 0x18). It has two eight-bit accumulators, A and B, two sixteen-bit index registers, X and Y, a condition code register, a 16-bit stack pointer, and a program counter. In addition, there is an 8 x 8-bit multiply (A x B), with full 16-bit result, and Fractional/Integer 16-bit by 16-bit Divide instructions. A range of 16-bit instructions treat the A and B registers as a combined 16-bit D register for comparison (X and Y registers may also be compared to 16-bit memory operands), addition, subtraction and shift operations, or can add the B accumulator to the X or Y index registers. Bit test operations have also been added, performing a logical AND function between operands, setting the correct conditions codes, but not modifying the operands.

Different versions of the HC11 have different numbers of external ports, labeled alphabetically. The most common version has five ports, A, B, C, D, and E, but some have as few as 3 ports (version D3). Each port is eight-bits wide except for D, which is six bits (in some variations of the chip, D also has eight bits). It can be operated with an internal program and RAM (1 to 768 bytes) or an external memory of up to 64 kilobytes. With external memory, B and C are used as address and data bus. In this mode, port C is multiplexed to carry both the lower byte of the address and data.
as u can see we need to make the byte call
inculde     "/'/./_
and your spacing
remove the / from my post

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Programming the 6809E
« Reply #15 on: September 25, 2013, 11:28:09 am »
Thanks. I'll look at that today.

Are you sure about X and Y occupying ABC & D? The 6809 docs make it painfully clear about it having 4 8 bit registers (A, B, DP, and CC) and five 16 bit registers XYUS and PC. I can't see how the HC11 be upward compatible with the 6800 if X and Y exist in the same space as ABCD.

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: Programming the 6809E
« Reply #16 on: September 25, 2013, 02:38:27 pm »
yes i am totaly sure of it
i rem when i started with mot. s records i ran into the same problem's u are having >compile wrong<

ed
Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.