Recently, after a quite long period of silence, I got a request from a friend from Spain who has a passion for the
AIM 65 board. He is a is very smart and dedicate guy and share with me the love for the fantastic primordial machines built around the 6502 CPU.
The request was to extract the Editor and Compiler sections from my original program to allow its use with the Rockwell AIM 65.
Despite of my very little knowledge about this platform, I thought it was an easy task...until I started to put hands and brain on this idea; wrong perception!
The main and unsolvable problem is my age! After several years passed from the original idea I lost a large amount of neurons, my memory is like a dynamic RAM not enough refreshed and, in the meantime, VB6 was abandoned by MS and I moved to C on PIC embedded projects...thus, I did recognized a little of what I created.
After a few attemps, the only valid solution found was to keep only the minimum core of the program e rebuild everything else, GUI included. The final result is a new program, surely with a quantity of bugs, but enough to write a code and assembly it.
The big difference respect the previous program is that this one in indipendent from the platform it is used with. An external auxiliary program, the MakeGlobal, allow to define the labels and addresses specific for the specific HW, if wished, like i.e. I/O devices, control ports, special HW chips.
What follows is the Help File, yet to be finished, contained within the program; it gives some short informations about how the program is done and how to use it.
This is the link to download the zipped folder with all the necessary to run the program.
Zipped folder version 3.1
The source code is still in evolution and I hope to have the time to make it final.
I would pray anyone who will use it to send me an email with the first name and the country of origin, for my own curiosity, thanks.
The program is aimed to convert a plain text file (.TXT), generated with the internal Editor or
with any other standard text editor, in an assembly file (.HEX) to be programmed into an EEPROM or
loaded in RAM on an HW development platform.
The expected instruction set is the 6502 standard, excluding the extra instructions of the 65C02 or other models. Anyway, it is possible to modifify the instruction's table inside the 'Tables' folder to include and reflect any other specific instruction.
To be executed the program requires a few special folders with some mandatory files inside;
The window has three zones: the left one shows the raw text code; the middle one is the formatted vision
and the right one present all the created projects.
A double click on a project name opens the text files, if the current one has been saved.
To delete a project visit the Projects folder and delete the folder with the project's name.
The top bar has the actions buttons: 'Create a new Project', 'Save the source', 'Open the Monitor'.
When the new or loaded text is completed it must be saved to enable its compilation.
After a succesful compilation with the 'Compile' button the right window list the result and the recognized labels in the source, in the Globals and in the Monitor, if it exists.
Within the Option it is possible to define whether to include or exclude the external labels.
The compiled file must be saved with the 'Save compiled' to create the .HEX, .LAB (labels) and .LST (listing) files.
In any error occurs during the loading or compiling phases, the lower message bar will report the error encountered and where. Fixed the offending line, the text file must be resaved e recompiled.
The bottom bar contains the field and command to find a text inside the source or to replace part of it with a differente value. Again, any change requires a new save and compile.
The source is a list of rows terminated by a CrLF; empty lines are allowed to permit blocks separation. It can be created with any text editor respecting these few rules:
Note that, as per default, any supplied value for operand or directives is considered to be a decimal value; it is anyway suggested to preceed it with the standard '#' sign. On the contrary, to input an hexadecimal value, it must be preceded with a '$' sign.
These directives are defined:
The operand can be missing (for some implict instructions as 'CLC' or omitted for implicit as in 'LSR'
or can be an 'A' as in ''PHP A', .
Numeric values are expressed in decimal mode (default) as '10' or, better, preceeded by an hash as '#10' or preceeded by dollar sign for hex as '$10'.
To enter an single ASCII code can be used in the form LDA #"H" including the letter within doublequotes.
In more complex operands it can be a label only or a label +/- a value to make a simple calculation as 'JMP HERE-$20'.
At last, it can be a standard 6502 format with or without a calculation, as in 'STA (TAB+10),Y'.
Please note that the +/- signs must follow and preceed the operands; no spaces are allowed.
At launch the program searches for a file called Globals.lab inside the Includes folder.
This file is created and modified by the auxiliary executable MakeGlobals.
It is a simple table where you can Add/Modify/Delete any label with its hex address/value and an optional comment.
The labels are typically the hardware resources available on the platform like I/O and ports controls.
You can create a file with common routines or definitions to be called from your application. This is standard text file like
any other project, but its name must be Monitor.
It is invoked from the command bar by hitting the Monitor button and the source, labels, listing and exe are stored inside the Includes folder.
At launch the program checks the Includes folder and, if the labels file exists, load the the Monitor labels and builds the specific Popup menu.
A right click inside the editor window will open a Popup Menu with 3 sections for Program, Globals and Monitor
labels (these last 2 if they exist). Selecting a label from the list will insert the label text in the code.
The Program labels are updated at any source saving.