BIT CRUNCHER
Using it:
Follow the instructions provided below for generating the machine code for your own assembly code.
1) Select your file by clicking on the 'BROWSE' button and choosing it from the file-tree.
2) If you want to view or recheck the file click on 'OPEN'.
3) Once you have selected the file, the path will appear in the text field above.
4) Simply click on the 'ASSEMBLE' button to assemble the input file.
5) If your input file is named ABC.asm the output file machine_code_ABC.bin will be created in the folder of BIT CRUNCHER.
Simple Instruction Set
Memory consists of bytes with 2 consecutive bytes forming a word. All addresses are byte addresses. There are a total of 256 bytes in computer memory, starting from 0 to 255.
There are four registers: A (accumulator), B, C and D. Each register is 8 bits in length.
Integers are stored as 8 bit binary numbers.
All machine instructions have the following 16 bit format. The detailed structure of the instruction format is shown below.
The basic set of instructions include:
1. ADD
2. SUB
3. LOAD
4. STORE
5. CMP (Compare)
6. JLT (Jump if less than)
7. JEQ (Jump if equal)
8. JGT (Jump if greater than)
Mnemonic | Indication | Operand 1 (optional) | Operand 2 (optional) |
Opcode (4 bit) | X (2 bit) | Register (2 bit) | Address / value (8 bit) |
Code for registers: A: 1, B: 2, C: 3, D: 4
Project Report with source code:
https://docs.google.com/leaf?id=0B-mmfn2DeWvJMDI3MDlhZTctNTYwMy00MTkxLWIzZjYtYjJlNzBjNzM4M2Vl&hl=en
https://docs.google.com/leaf?id=0B-mmfn2DeWvJMDI3MDlhZTctNTYwMy00MTkxLWIzZjYtYjJlNzBjNzM4M2Vl&hl=en
No comments:
Post a Comment
Do you think this information useful or was not up to the mark? Comment if you have any advices or suggestions about the post.