Menu

Tree [83c997] master /
 History

HTTPS access


File Date Author Commit
 LICENSE.text 2010-07-26 Joel Matthew Rees Joel Matthew Rees [1e335e] Normalizes the module header useage.
 README.text 2012-09-03 Joel Matthew Rees Joel Matthew Rees [ff37b2] Unfinished add 68hc11, adjust operand gen.
 asm68c.c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 asm68c.h 2012-09-29 Joel Matthew Rees Joel Matthew Rees [37006f] test code hand fixed for 6800, some related edits
 asmspec 2010-07-26 Joel Matthew Rees Joel Matthew Rees [809233] This should fix things so it actually assembles...
 autotest_6800.68c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 autotest_6800.list 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 autotest_6801.68c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [83c997] Looking good for 6801, too. Finally back to whe...
 autotest_6801.list 2012-10-08 Joel Matthew Rees Joel Matthew Rees [83c997] Looking good for 6801, too. Finally back to whe...
 chk_6800.ods 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 chk_6801.ods 2012-10-08 Joel Matthew Rees Joel Matthew Rees [83c997] Looking good for 6801, too. Finally back to whe...
 exp.c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 exp.h 2012-09-21 Joel Matthew Rees Joel Matthew Rees [a4d1f9] Various things that don't work, not fixed.
 longertest.68c 2012-09-03 Joel Matthew Rees Joel Matthew Rees [ff37b2] Unfinished add 68hc11, adjust operand gen.
 mne68c.c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 mne68c.h 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 newtestlc.68c 2010-07-26 Joel Matthew Rees Joel Matthew Rees [6d76d1] First, have to get the source to compile.
 ops68c.c 2012-10-08 Joel Matthew Rees Joel Matthew Rees [e1e676] Fix the fixes, 6800 now assembling okay; fixed ...
 ops68c.h 2012-09-29 Joel Matthew Rees Joel Matthew Rees [37006f] test code hand fixed for 6800, some related edits
 shortest.68c 2012-09-08 Joel Matthew Rees Joel Matthew Rees [178882] Fix the names in mne68c.h, start pattern genera...
 tek.68c 2010-07-26 Joel Matthew Rees Joel Matthew Rees [bc5e3c] These are the original files for my project for...
 testabunch.68c 2012-09-09 Joel Matthew Rees Joel Matthew Rees [a1b131] Generate test file with -t. Not passing all tes...

Read Me

Motorola 6800/01 absolute assembler
by Joel Matthew Rees between 10 October and 17 October 1985.
Copyright 2010 Joel Matthew Rees.

Written for cs432 at Brigham Young University for J. J. Ekstrom

The author(s) grant permission to use or distribute this program  
under the terms of version 3.0 of the GNU General Public License (GPL).
(See <http://www.gnu.org/>.)

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

Refer to the file LICENSE.text included with the source.
If that file was not included, see <http://www.gnu.org/licenses>. 

The original project should be at <http://asm68c.sourceforge.net>.


=============================================
No makefile necessary:

cc -Wall -o asm68c *.c

will do the trick just fine.
(It's a really simple assembler.)

=============================================


---------------------------------------------------------------------------
Files in the distribution:

asm68c.c defines the main funtion and the overall flow.
asm68c.h is the global header information.

asmspec is the specification which was approved by the teacher for the project.

exp.c/h is the expression evaluater code (easy recursive descent).

mne68c.c/h is the mnemonics table.
The table is sorted and converted to a balanced binary tree at startup.
It contains 6801 extensions.
I may be able to add 68HC11 extensions, as well.
(Added the sorting and balancing, August 2012 -- JMR). 

ops68c.c/h is the operand parser.

LICENSE.text is the license (GPL3) extended by the original author.
(.text because I sometimes thumb my nose at certain lax practices.)

README.text is this file.

newtest.68c is a really, really short test source file.
(I couldn't find the source code I used to pass the thing off.)

newtestlc.68c is newtest.68c in lower case. 
(No, the current version doesn't.)

longertest.68c is a slightly longer test source file.

tek.68c was something that shouldn't have been here, but was. 
(No it doesn't assemble, either.)

---------------------------------------------------------------------------
Notes:

Two tricks I slipped in that I shouldn't have:
Write "LDAA" and "LDAB" as "LDA" and LDB";
likewise, "STAA" and "STAB" as "STA" and STB", also OR.
I was wishing for a 6809 at the time, I think.
I'll have to untangle them from LDD and STD to make them standard.
Or maybe I'll add dual syntax by macros. Or something.

(Stupid fetish with pulling the A/B/D parameters off 
the ends of the operator mnemonics. 
Logical games that waste time.)

The short funtion names and file names derive from the work 
environment we had back then. (6~8 significant characters.)

Much of the structure derives from my prior experience with BASIC, 
ForTran, Pascal, FORTH, early M6800 assemblers etc., my lack of 
experience with separate compile, and my personal take on the 
older K&R syntax.

The brittle hand-optimized binary tree symbol table was something 
I repeated in BIF-6809, and it remains in bif-c as I write this.

This program took too much of my time relative to the class.
The quality of my implementation caused one of the TAs to suspect 
I had copied the code from somewhere. She grilled me on the 
techniques, and I guess she was satisfied. But I ran out of time, 
had to take an incomplete and finish the coursework after I 
dropped out. 

Oh, BIF-6809, my FORTH was what I finished the course with. 

I still don't understand what level the teachers intended us to 
work at on the homework. Why bother having students do any 
homework if there's no time for understanding, only time for 
going through the motions? 

And, ultimately, you just copy what the teacher shows you and 
try to fill in the gaps, and if you're unlucky enough to be off 
the teacher's wavelength, you're dead meat.

Well, everybody else just copied from the board. I tried to 
really understand. I was dead meat.

I think this was the course that I let do me in, trying too hard.

---------------------------------------------------------------------------
Began code cleanup on 23 July 2010.
Completed initial cleanup on 26 July 2010, 
cleanly compiled on gcc and assembled a short test file.
More code cleanup, added op-code table sorting and balancing, 20-24 August 2012.

---------------------------------------------------------------------------
To do (if I could ever justify the time, in no particular order):

Find or produce a real test file that does something useful.
(And what would I run it on?)

Fix the S1/S9 object output (or was it S1/S10?) and checksum code. 
(I'm sure it's wrong.)
* Checksum fixed, 2012.08.21.
* S9 record needs some way to know the entry point (pseudo-op).
* Workaround: ORG start at the end, no code after.

Convert the symbol table code to better support adding mnemonics. 
(Such as macro definitions and relative pseudo-ops?)

Build an emulator to run the code on. (Fun stuff! 8-))

I should be able to relax the checks that require the image array.

Convert it to assemble M6809 source code.
(Lost opportunities. Oh, the lost opportunities. <:-< )

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.