The ANSI C SRC Simulator


The ANSI C simulator simulates the operation of the SRC computer. It is a functional simulator that executes binary SRC programs, and allows the display of registers and memory. Here is a view of the simulator after executing the command, sim:

 
______SRC Monitor and Simulator Version 1.0.______
 
SRC Monitor Commands:
is: Initialize Machine State.
ds: Display Processor State.
cr: Change Reg. Contents. Use cr RegNum HexValue.
cp: Change PC. Use cp HexValue.
dm: Display block of Memory. Use dm HexAddress.
cm: Change a block of Memory words. Use cm HexAddress.
cbm: Change a Block of Memory bytes. Use cbm HexAddress.
dbm: Display a Block of Memory bytes. use dbm HexAddress.
lb: Load a Binary file. You will be prompt for filename.
ss: Single step. Execute one instruction. No arguments.
strt: Start. Start execution at [PC]. No arguments.
q: Quit the simulator.
h: Help. Repeats this message.
 
(Only first 16K bytes of ram are populated.)
 
Monitor command: is ds cr cp dm cm cbm dbm lb ss strt q h? lb ; load binary file
Name of binary file: tst.bin ; named tst.bin
 
Monitor command: is ds cr cp dm cm cbm dbm lb ss strt q h? cp 3f0 ; set PC to start address
Monitor command: is ds cr cp dm cm cbm dbm lb ss strt q h? strt ; start the simulation
Monitor command: is ds cr cp dm cm cbm dbm lb ss strt q h? ds ; display state after sim
 
R[0]= fffffff6 R[1]= e R[2]= 4 R[3]= e
R[4]= 12 R[5]= 20 R[6]= 0 R[7]= 0
R[8]= 0 R[9]= 0 R[10]= 0 R[11]= 0
R[12]= 0 R[13]= 0 R[14]= 0 R[15]= 0
R[16]= 0 R[17]= 0 R[18]= 0 R[19]= 0
R[20]= 0 R[21]= 0 R[22]= 0 R[23]= 0
R[24]= 0 R[25]= 0 R[26]= 0 R[27]= 0
R[28]= 0 R[29]= 0 R[30]= 0 R[31]= 0
IR = f8000000 PC = 414
 
Monitor command: is ds cr cp dm cm cbm dbm lb ss strt q h?

 
ANSI C SRC assembler
return to home page