68xx cross assembler
I've gotten quite a few questions now about my assembler and workflow for the MC3. I've used the same old 6800/01/04/05/09/11 assembler for years. I think it's made by E J Rupp originally. It's very basic and does not handle macros and such but it's clean and I do have the source code and have made a few modifications over the years. Mainly adding a version (as1h) that supports the very useful XGDX opcode for 6301/6303. The output is Motorola S-record (S19) that is directly compatible with most monitors and PROM programmers. Below is an archive of the assembler with both source and Linux binaries. Download assembler source and binaries I have included a build script (build.sh) for compiling under GCC. Assemble and generate s19-file $ as1h program.asm Assemble and generate listing + s19 $ as1h program.asm -L > program.lst As for assembler editor I use Emacs all the way. It handles 68xx assembly nicely.
by DJLinux 2017-03-23 04:30 UTC
in some files you define two different commands with the same opcode 0x8D=141 "bsr", 141 "jsr", 0x8D do you mean 0xBD "bd" not "8d" ? DJ

by daniel 2017-03-23 07:29 UTC
Hi Dj! I understand the confusion. Actually the op codes that have all the addressing modes IMM, DIR, IND and EXT are represented in the table in their IMM form. That's why the JSR becomes a BSR. The assembler sets bits 5 and 6 in the op code according to the addressing mode specified during assembly. Hope that clears it up a bit. I can't explain the sudden mix of decimal and hexadecimal numbers the source code. I blame temporary delirium, sleep deprivation, position of the planets or possibly the cat :)

by Grant B 2018-01-23 18:07 UTC
If I may be so bold as to bookmark a couple more assemblers that work for the 6303 (and many other) CPUs. Both also come with source code. The one I am using now is called DASM-2.20. It an unfortunate name for an assembler (rather than a disassembler), but it supports many CPUs and is pretty good. Here is one "source" for it (there are binaries): https://sourceforge.net/projects/dasm-dillon/files/dasm-dillon/2.20.11/ However, the one I really want to use is the Alan Baldwin one. I just have to find some binaries as I don't think I have the tools to build it anymore. (I have used this family of assemblers for decades for many old Motorola projects like 6809 and 68HC11. And now I want to port some of that old code to the 6303): http://shop-pdp.net/ashtml/asxxxx.php I hope this helps someone.

by Grant B 2018-01-23 18:16 UTC
And for completeness I should perhaps add one more. It says it supports the Hitachi 6301 (as well as many more targets of course). I have not used it (yet) and it's simply called "AS". http://john.ccac.rwth-aachen.de:8000/as/ And one question: Are there any books or textbooks on this family you recommend?

Write a comment


E-mail (not visible)


Code from above