Download Latest Version Electro-Mechanical-Computer-Simulation-1.0-For-JRE-7.tar.gz (943.1 kB) Get Updates
Home
Name Modified Size InfoDownloads / Week
readme.txt 2015-02-07 6.7 kB
Electro-Mechanical-Computer-Simulation-1.0-For-JRE-7.tar.gz 2015-02-06 943.1 kB
Totals: 2 Items   949.8 kB 0
Electro-Mechanical Computer Simulation Version 1.0 README --------------------------------------------------------- The file Electro-Mechanical-Computer-Simulation-1.0-For-JRE-7.tar.gz is a compressed archive containing an executable "JAR" file or Java Archive and four hand assembled programs for the simulated computer. If you are using a Windows system you will need a utility such as 7-Zip or WinZip to extract the files to your system. On a Linux system you should be able to extract them using the built-in archive manager. The contents of the archive are as follows: 8BitDivide.txt 16bitdivide.asm Eight Bit Multiply by Repeated Addition (167x28).TXT ElectromMechanicalComputerSimulation-Version 1.0.jar Sixteen Bit Mulitply by Repeated Addition(65535x65535).TXT The simulation requires a Java Runtime to work. You will need at least Java version 7. It may work with earlier versions of Java but it was developed using Java 7. It has been tested on Java version 7 and on version 8. You can get Java from http://www.oracle.com/technetwork/java/index.html. With Java installed you can simply double-click on the .JAR file to launch the simulation. All of the machines described on the Facebook page (https://www.facebook.com/electromechanicalcomputer) for the project are included in the .JAR file, but the default machine is the electro-mechanical computer. After launching the simulation, you can use the computer. Select one of the programs (or write your own using the instruction set described below) and open it in a text editor. 1. Flip the "RESET" switch into the "ON" position (up). 2. Flip the "TAKE OVER" switch into the "ON" position. The control panel is now ready for you to enter your program. 3. Enter the address where you wish to store a byte of data by flipping the appropriate switches labeled "A0" through "AF" (from right to left) into the "ON" or "OFF" (down) position. 4. Specify the byte of data by flipping the appropriate switches labeld "D0" through "D7" into the "ON" or "OFF" position. 5. Enter the byte of data into memory by flipping the "WRITE" switch into the "ON" position. The row of lamps beneath the data switches ("D0" through "D7") will light up indicating which bits of the memory location are on and which are off. Tthey should match the data switch positions, each switch that is on should have a corresponding lit lamp. 6. Flip the "WRITE" switch into the "OFF" position before entering your next address or data byte. If you fail to do this you will be writing the byte corresponding to the data switches into each address corresponding to the address switches as you toggle the address switches. This can potentially overwrite data that you have already entered. 7. Repeat steps 3 through 6, entering each byte of the program into memory. 8. Flip the "TAKE OVER" switch into the "OFF" position. 9. Flip the "RESET" switch into the "OFF" position. Your program will now run. If you have entered everything correctly using the switches you will see the bank of lamps at the bottom of the control panel start flashing for a while. If your program runs to completion (in other words, it reaches a HLT instruction during a code fetch cycle) the bank of lamps will stop flashing and the "HALT" lamp will turn on. This is your indication that your program has completed execution. 10. Flip the "RESET" switch into the "ON" position. This will prevent the computer from performing random operations while you inspect the results. 11. Flip the "TAKE OVER" switch into the "ON" position. The control panel switchs are now active. 12. Inspect the results of running your program by entering the addresses of the bytes you wish to inspect on the bank of address switches. As each switch is toggled the byte at that memory location will be displayed on the bank of lamps. All of the inputs and outputs of the machine are expressed in binary numbers. For convenience the hand assembled programs use the hexadecimal numbering system. Each digit of a hexadecimal number corresponds to four bits in a binary number. The table below should help when entering or reading results. Hexadecimal Digit Binary Equivalent ----------------- ----------------- 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111 The instruction set for this computer is described below. These instructions require three bytes, the Opcode, the high-order byte of the 16-bit address, and the low order byte of the 16-bit address. The Instruction mnemonic code, hexadecimal opcode, binary opcode, and description are given in order for each instruction. LOD 10 0001 0000 Load byte into accumulator STO 11 0001 0001 Store byte in accumulator to memory ADD 20 0010 0000 Add byte to accumulator SUB 21 0010 0001 Subtract byte from accumulator ADC 22 0010 0010 Add byte to accumulator, with carry input SBB 23 0010 0011 Subtract byte from accumulator, with borrow JMP 30 0011 0000 Unconditional jump JZ 31 0011 0001 Jump if zero JC 32 0011 0010 Jump if carry JNZ 33 0011 0011 Jump if not zero JNC 34 0011 0100 Jump if not carry OR 40 0100 0000 Bitwise OR byte in accumulator with memory. AND 41 0100 0001 Bitwise AND byte in accumulator with memory. XOR 42 0100 0010 Bitwise XOR byte in accumulator with memory. The HLT instruction is one byte, hexadecimal FF, or binary 1111 1111, and halts the processor. This is not a fast computer. Each clock cycle takes several milliseconds and there is a pause of 10 milliseconds between them. The 16x16 bit multiplication example program will take nearly a day to run on a fast computer and a few days on slower ones. The point of this machine isn't speed, but to demonstrate how a computer works from the ground up. Known Issues: The .JAR file is named incorrectly. It should be "ElectroMechanicalComputerSImulation-Version 1.0.jar" This will be corrected in the next release. "16bitdivide.asm" should be named "16bitdivide.txt" This will also be corrected in the next release The program files for the machine use UNIX line endings, so opening them in Notepad on Windows will likely look odd. You can open them using WordPad which will recognize the line endings correctly.
Source: readme.txt, updated 2015-02-07