-
Mano Simulator is a web-based application that simulates the Mano machine, a hypothetical computer designed by Morris Mano.
-
The Mano machine is a simple 16-bit computer that can perform basic arithmetic and logical operations, as well as input and output operations.
-
The Mano Simulator allows you to write, assemble, and execute assembly code for the Mano machine, and observe the changes in the memory and registers.
-
Written with html, css, and javascript.
-
To see the list of instructions please use Mano Instructions Table
• A code editor.
• A memory table that displays the addresses and contents of the 4096 words of memory.
• A instructio table that shows the current state of the program counter, accumulator, and flags.
• A command table that displays the current instruction, operand, and operation code.
• A control panel that allows you to fetch, decode, and execute each instruction step by step, or reset the program.
• A help button that shows information about the program and the Mano assembly language.
To use this program, follow these steps:
- Write your code in the left box of the page.
- You should add each instruction in a separate line.
- Click the Assemble button to assemble your code.
- If the assembly process is successful, you will see a message saying "Assemble Successful".
- Otherwise, you will see an error message indicating the type and location of the error.
- If the assembly process is successful, the addresses and contents of the memory will be displayed in the table on the right.
- This table shows how your code is stored in the memory of the Mano machine.
- To execute your code, you must first click on the Fetch button, then the Decode button, and then Execute for each instruction.
- You must follow this order to simulate the instruction cycle of the Mano machine.
- The buttons will be activated or deactivated accordingly.
- By clicking on the Fetch, Decode, and Execute buttons, the middle table related to the commands will change and display the current instruction, operand, and operation code.
- For convenience, each instruction that is executed will be shown in a box below the code editor.
- This box shows which instruction is currently being processed by the Mano machine.
- Whenever the memory table is updated by an instruction, it will be displayed at the right table of the program
- the updated value will be highlighted with a different color.
- This helps you to see how your code affects the memory of the Mano machine.
- you should have "END" instruction in your code in order to be executed.
- At the end of executing your code, a message box will be displayed saying "End of Program".
- This means that your code has finished executing and there are no more instructions to process.
- To use the program again, you must click on the Reset button.
- This will clear all the tables and boxes, and reset all the values to zero.
- You can then enter a new code or modify your existing code and assemble it again.
• Empty code box: You have not entered any code in the box.
• Invalid instruction: You have entered an instruction that is not recognized by the assembler.
• Undefined variable: You have used a variable that has not been defined before.
ORG 100
LDA AL
ADD BL
STA CL
CLA
CIL
ADD AH
ADD BH
STA CH
HLT
AL, DEC 12
AH, DEC 32
BL, DEC 40
BH, DEC 02
CL,DEC 0
CH, DEC 0
END
-
Clicking on Assemble Button
-
Executing LDA instruction
-
Executing ADD instruction
-
Executing STA instruction
-
Executing CLA instruction
-
Executing CLI instruction
-
Executing ADD instruction
-
Executing ADD instruction
-
Executing STA instruction
-
Executing HLT instruction
-
END of the program
- You can see a live demo of this program here.
- You can also download or clone this repository and run it locally on your browser.
- MIT © Hadis Ghafouri
- You can use it for personal or educational purposes as long as you give credit to its author.
- This project was created by Hadis Ghafouri as a final project for Computer Architecture course at IUT.
- You can contact me by email at [email protected].