Sim68

An introduction

Sim68 is a simulator of the Motorola 6811 MCU, a versatile 8-bit microcontroller.
It has been ported from a UNIX command-line program by Ted Dunning (ted@crl.nmsu.edu).

During the port, the core of the simulator remained almost the same ( and with small effort, it would be possible to extend it to other 68xx-family microprocessors ) while the interface became a strange mixture of ANSI and Mac Toolbox code ( sscanf mixed with FSRead and similar).
The back-bone of Mac-specific code is MacStarter, an application framework by David Eck (eck@hws.bitnet), extended to support a primitive multi-window text-editor & file handling.

This program is absolutely FREEWARE and comes with source code (for the brave ones),
but if you improve it in any way, I would like to be informed;
if redistributing the application, I ask that whole documentation and sources be included, and, in case it were a modified version, you should clearly state so.

Since first release, many bugs have been fixed and the interface has evolved a bit, thanks also to those who contributed code and ideas (in particular Rob Scott, Rus Maxham and Mark Coniglio).
Keep on with your precious feedback!

For any kind of suggestion, bug report or comment, you can reach me by Email at sarago@dei.unipd.it .
In particular, bug reports would be more "pleasant" if accompanied by some 6811 assembly code illustrating the problem :)

And last but not least, if you like this program, what about a postcard from your country ?
My address is:

Tomaso Paoletti
Via Cartera,1
31051 Follina (TV)
Italy

Thanks to all those who wrote.
Bye, Tomaso


System requirements

The application comes in fat-binary form and its minimum requirements are
1MB free RAM, System 7 and Color QuickDraw.


Features and Additions

It is possible to drag & drop both text and code files to the application;
files with a S19 or HEX suffix are loaded as code, while others are opened as plain text.
The same behaviour is available double-clicking Sim68 files (plain text files can be changed to Sim68 files via the application included in Support tools folder).

If it can be of some use, the simulator runs also in background and the "kindness" towards background processes (and user interaction) can be tuned throught the Options dialog.

Balloon help is available on menus (no dialogs at this time).


Options


Some technical stuff

S19 file format

The simulator loads 6811 code written in a format known as S19 (or S-record).
Mac, Unix and DOS text files are accepted and loaded.
Note that files with suffix .HEX are handled as S19 files, but this suffix usually refers to Intel HEX format, used by other MCUs.

Symbols

for those like me who sometimes get lost looking at disassembly...
Symbols are textual labels representing hexadecimal addresses, are used in disassemblies and substitute raw hex values where possible.
Additionally, symbols are recognised in every dialog where an hexadecimal value is expected (for example, you could type EEPROM instead of F800, or dump content of location 1026 typing PACTL).

Note that symbol evaluation is CaSe SEnSiTive and unrecognized symbols (or invalid hex values) will be signaled during dialog input.

A simple way to create files of symbols:

	using As11, the freeware Motorola assembler,
	turn on option -s,
	redirect output to a text file
	and assemble your ASM file.

	using As11+,
	just drop ASM file
	(As11+ is configured to generate symbol files).
	

Symbol files should have the same name as their S19 counterparts in order to be loaded automatically.
In fact, while loading S19 files, the simulator does the following:

  1. loads plain S19 file (say <name>.s19)
  2. tries to load a file of symbols (in tab or space separated format) with the following suffixes:
    <name>.sym
    <name>.txt
    (in working directory, only)
  3. if previous step fails, tries to extract EQUates from the original ASM file (assuming it is called <name>.asm)
  4. asks the user to locate the file (see Options)

In case you edit SYM files by hand, please note that hex values are not allowed as labels (otherwise, how could the simulator distinguish between, say, hex FFA1 and symbol FFA1 ?).

Symbols still lack some functionality : for example, it is not rare to see incorrect labels (in case of duplicate values, the first label is choosen) so I left it as an option.

Interrupts

Support for interrupts is partially in place, i.e. some interrupt service routines are really called (RTI, TOC, timer overflow, ..) while others still need work. A mechanism for prioritizing and queueing requests is already implemented but needs a lot of testing.

While interrupts are enabled, every loaded program should set its interrupt vectors. Non-initialized interrupt vectors may cause "bad op" errors during program execution.
A good practice is to make all unused interrupt vectors point to a "spurious" interrupt handler (see hexmon40.asm for an example).


6811 Development Tools

This is a list of freeware 6811 development tools available on the net.
As11
Freeware assembler (with sources).
As11+
Drag&drop assembler, derived from previous one, is included in this package.
Dlm & Mon
Downloader and command-line monitor
Downloader
Mac-style conformant downloader
Debug11
Integrated assembler / downloader / debugger

Most of these tools can be downloaded, via anonymous FTP, from
cher.media.mit.edu or ftp.ee.ualberta.ca.

By the way, if you find other interesting tools, why not dropping me a line at sarago@dei.unipd.it ? Thanks.


About this distribution

You should have received a StuffIt archive containing:
Sim68 "fat" application,
a folder of assembly / S19 test files,
documentation,
a folder containing all sources and CodeWarrior projects
folder with support tools and their documentation
and a README file