pblop / exec09 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nealcrook/exec09
The portable, extendable 6809 simulator
Home Page: http://www.oddchange.com/gcc6809/simulator.html
License: GNU General Public License v2.0
This project forked from nealcrook/exec09
The portable, extendable 6809 simulator
Home Page: http://www.oddchange.com/gcc6809/simulator.html
License: GNU General Public License v2.0
This is a rewrite of Arto Salmi's 6809 simulator. Many changes have been made to it. This program remains licensed under the GNU General Public License. ----------------------------------------------------------------- Build and install (on Linux) you will need make, gcc, aclocal, automake and probably some other stuff. Then: > ./configure > make There is one executable, m6809-run. You can install it ("make install") or simply reference it explicitly. To see configure options: > ./configure --help Enable readline libraries if you have them installed; this will allow you to use command-line recall and other shortcuts at the debugger command-line: > ./configure --enable-readline > make ----------------------------------------------------------------- Input Files ----------------------------------------------------------------- Machines The simulator now has the notion of different 'machines': which says what types of I/O devices are mapped into the 6809's address space and how they can be accessed. Adding support for a new machine is fairly easy. There are 5 builtin machine types at present: * 'simple' - assumes that you have a full 64KB of RAM, minus some input/output functions mapped at $FF00 (see I/O below). If you compile a program with gcc6809 with no special linker option, you'll get an S-record file that is suitable for running on this machine. The S-record file will include a vector table at $FFF0, with a reset vector that points to a _start function, which will call your main() function. When main returns, _start writes to an 'exit register' at $FF01, which the simulator interprets and causes it to stop. gcc6809 also has a builtin notion of which addresses are used for text and data. The simple machine enforces this and will "fault" on invalid accesses. * 'wpc' - an emulation of the Williams Pinball Controller which was the impetus for me working on the compiler in the first place. * 'eon' (and 'eon2') - still in development, is called 'eon' (for Eight-O-Nine). It is similar to simple but has some more advanced I/O capabilities, like a larger memory space that can be paged in/out, and a disk emulation for programs that wants to have persistence. * 'multicomp09' - see miscsbc.c for details * 'smii' - see miscsbc.c for details * 'kipper1' - see miscsbc.c for details TODO : Would anyone be interested in a CoCo machine type? ----------------------------------------------------------------- Faults ----------------------------------------------------------------- Debugging The simulator supports interactive debugging similar to that provided by 'gdb'. b <expr> Set a breakpoint at the given address. bl List all breakpoints/watchpoints. c Continue running. d <num> Delete a breakpoint/watchpoint. di <expr> Add a display expression. The value of the expression is display anytime the CPU breaks. h Display help. l <expr> List CPU instructions. me <expr> Measure the amount of time that a function named by <expr> takes. n Continue until the next instruction is reached. If the current instruction is a call, then the debugger resumes after control returns. p <expr> Print the value of an expression. See "Expressions" below. q Quit the simulator. re Reset the CPU/machine. runfor <expr> Continue but break after a certain period of (simulated) time. s <expr> Step for a certain number of CPU instructions (1 by default). set <expr> Sets the value of an internal variable or target memory. See "Expressions" below for details on the syntax. so <file> Run a set of debugger commands from another file. The commands may start/stop the CPU. When the commands are finished, control returns to the previous input source (the file that called it, or the keyboard.) sym <file> Load a symbol table file. Currently, the only format supported is an aslink map file. td Dump the last 256 instructions that were executed. wa <expr> Add a watchpoint. The CPU will break when the memory given by <expr> is modified. x <expr> Examine target memory at the address given. info Describe machine, devices and address mapping. ----------------------------------------------------------------- Original README text from Arto: simple 6809 simulator under GPL licence NOTE! this software is beta stage, and has bugs. To compile it you should have 32-bit ANSI C complier. This simulator is missing all interrupt related SYNC, NMI Etc... I am currently busy with school, thus this is relased. if you have guestion or found something funny in my code please mail me. have fun! arto salmi [email protected] history: 2001-01-28 V1.0 original version 2001-02-15 V1.1 fixed str_scan function, fixed dasm _rel_???? code. 2001-06-19 V1.2 Added changes made by Joze Fabcic: - 6809's memory is initialized to zero - function dasm() had two bugs when using vc6.0 complier: - RDWORD macro used two ++ in same variable - _rel_byte address was wrong by 1. - after EXIT command, if invalid instruction is encountered, monitor is activated again - default file format is motorola S-record - monitor formatting
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.