The simulator can be used in conjunction with MULTI to interactively debug programs that may be difficult to debug. Invoking the simulator either from the command line or as a result of the MULTI remote command, will bring up two other windows, one labeled TARGET and the other labeled IN/OUT.
The IN/OUT window is where all output to stdout goes, and all input from stdin comes from. This separates communication with the remote process from communication with the simulator itself.
The TARGET window provides an interface to the simulator. Target commands provide a comprehensive view of the internal state of the simulated processor. Some of these commands are only useful in the simulator's ROM mode. The commands currently available in the MCore simulator are listed in the table found below.
All of these commands can also be reached from the MULTI Debugger command pane by using the target command.
The simulator is able to deal with number of system calls. The following table lists these system calls.
exit |
close |
stat |
link |
read |
access |
fstat |
unlink |
write |
creat |
brk |
getpid |
open |
lseek |
time |
alarm |
A large portion of library functions use a combination of these calls to achieve their goal. These system calls are unavailable to you in ROM simulation mode.