Sahara 2000

computer simulator user's manual

By Paul Gonchar in 1999, CS faculty, DSTU, Ukraine

 

Sahara 2000 is the 2 - address machine program simulator. The main features of the machine:

LOAD(0), STORE(1), ADD(2), SUB(3), MUL(4), DIV(5), AND(6), OR(7), XOR(8), SHR(9), SHL(10), CMP(11), B(branch)(12), JAL (jump and link)(13), J (jump)(14), HALT(15)

The structures of instruction and flag register are shown below

Sahara 2000 machine realizes the Fon-Naman principle, i.e. there is no difference between data and code until they are fetched.

The program model was built on Java and arranged as an applet. This allows to run the model on any platform and to provide an absolute safety.

In the model the decimal system has been used. This may cause inconveniences with writeing a program but under model's memory size they are not too big. Besides, it relieves the initial data input.

After the model starts it is set to initial state. This means that all registers and almost all system memory are set to zero. Program counter (PC) is points to instruction with zero address. The system memory with addresses 56,57,58,59,60 is filled with values 111,222,333,444,555 accordingly. This were made to enter some initial data to the system, because there is no any instruction in instruction set which whould work with immediate operands (this is connected with the Technical Task). This can be equalized with a system power-on ROM. After resetting the machine it is possible to write some other information to this memory. To reset Sahara without reloading the model press the "Reset" button.

To simulate one Sahara's cycle You should press the "Make a step" button. Necessary instruction is fetched from system memory to the Instruction Register (IR). Then it is decoded and necessary data is fetched from system memory (according to DA field) and from a register (according to reg field). If the contents of the reg field is the number from 0..15 this means a general purpose register. Value of 255 means accumulator and 254 - flags register. Other numbers are not significant and the zero general purpose register will be referenced by default. After decoding the data through the A and B registers propagates to ALU if necessary(it is not necessary for load, store, halt, branch and jump instructions). If an instruction uses ALU for it's execution the result is stored in accumulator. Branch instruction reloads the PC. JAL instruction stores the current PC in the general purpose register defined by the reg field and reloads the PC with the subroutine address. J instruction fetches return address from this register (which must be specified too) and reloads the PC with it. HALT sets the H flag to 1. To reset this flag You should reset Sahara or reload the model. CMP instruction substructs the numbers in the A and the B registers and sets the Z flag if necessary. If Z is in active state a branch will be performed using the address in A1 field and using A0 field otherwise.

To change the system memory You should enter necessary address in "Address" field of the model and value you want on "Value" field. After that press the "Change" button. If numbers you have entered are correct the memory will be changed. Otherwise, the error message will be displayed.

To quit the model press the "Get out of here" button.

Want to see an example?

If any questions e-mail to pumbaa@england.com. I'll be happy to assist You.

The Sahara 2000 computer simulator user's manual. By Paul Gonchar, Computer Science faculty, Donetsk State Technical University, Ukraine, 1999




Rambler's Top100