| Home | Products | Prices | Site Map | Order | Contact | What's New | Books | Free Files | Links | FAQ |
| Back to Free Files - (Don's Download Dungeon) |
Hello Don,
Please see attached latest version of Simulator.
More bugs fixed as found.
Kind Regards
Steve Nolan
http://www.dontronics.com/zip/sim51.zip
234K
The memory model used is as follows:
64 KBytes External
RAM
Address Range 0..65535
64 KBytes
ROM
Address Range 0..65535
128 Bytes Internal Indirect Address Range
80..255
256 Bytes Internal Direct Address
Range 0 ..255
You must ensure that code does not access memory space that will not be available on the final hardware system.
The simulator will accept both 8 bit Intel hex files and raw binary files.
When a file is opened, the simulator ROM is updated and the file is then closed.
Just move your mouse pointer around the main window buttons to view their function in the status bar.
Core Window
This window displays the core register contents.
Registers or flags can be modified by clicking on them and then enter
the new value. Hexadecimal numbers must be used.
Listing Window
This window displays 32 lines of disassembled code and will follow
the position of the instruction pointer as you step through the
program.
To step over instructions such as DJNZ loops. Just point to the line following the DJNZ instruction and double click. The IPTR will now be loaded with the address of that instruction and you can just carry on from there.
N.B You can also change the IPTR in the core window.
Direct Memory Window
This window shows the contents of the processor direct memory.
Register contents can be changed by double clicking register.
InDirect Memory Window
This window shows the contents of the processor indirect memory.
Register contents can be changed by double clicking register.
ROM Window
Contents of ROM memory can be viewed.
RAM Window
Contents of external RAM memory can be viewed.
BreakPoints Window
You can set up to 4 breakpoints. Turns green when a breakpoint is set.
Serial Comms Output Window.
If you include code in your program to output data from the serial
port, then you can view the serial port output from this window.
Your code must use the status transmit interrupt bit TI to send data.
i.e
CLR TI
MOV SBUF,#data
; or whatever source
Here: JNB TI,Here ; wait
until sent
I have not as yet included serial comms interrupt facility.
Data is sent straight to text screen.
Byte 0Dh causes newline.
System is set to simulate 11.0592MHz crystal with 9600 Baud with 1
Start
,1 Stop, and 8 Data bits.
960 instructions will be executed before TI is set.
Processor settings have no effect on baudrate etc.
Timing is not 100% accurate since instruction cycle time not used ..
yet.
Output only when in Run Mode.
Serial Comms Input Window
You can use this window to send data to SBUF from the keyboard.
When a character is sent, it is put into SBUF and receive interrupt
bit RI is set. Works only when in Run Mode.
To get input source use something like
Here: JNB TI,Here ; Wait for
Input
MOV
A,SBUF
; Keyboard character now in A.
CLR
TI
; Ready for next byte;
Controls
Run
Program is executed from current IPTR position.
Processor, Indirect, and Direct screens are updated periodically.
On my PC around 4 to 5 million instructions are executed each second,
so it would be pointless to update screen continuously.
Up to 4 breakpoints can be set to stop at required position.
Pause
Program is paused at current position. Can now be stepped if required.
Stop
Processor is stopped and reset.
Step Into
The next instruction is stepped to.
Step Over
Breakpoint is set at next instruction and processor is run.
I have not put anything clever around this.
If the instruction doesn't get pointed to, then the processor will
not stop.
You must press the pause or stop buttons.
Thats more or less it..
The program is pretty basic at the moment, but it does more or less everything that I need from a simulator.
I am prepared to develop further .. so if you have any suggestions then please contact me.
Any bugs,problems or suggestions please contact
stevenolan@breathemail.net.
_
Copyright © 1996-2006 Dontronics
| Top of Page |