Computer Organization & Architecture Lab (CSC451) : Dr. Bibhash Sen Associate Professor Department of CSE, NIT Durgapur
Computer Organization & Architecture Lab (CSC451) : Dr. Bibhash Sen Associate Professor Department of CSE, NIT Durgapur
Computer Organization & Architecture Lab (CSC451) : Dr. Bibhash Sen Associate Professor Department of CSE, NIT Durgapur
Features:
Quickly editable register and memory values, similar to a spreadsheet.
Display values in hexadecimal or decimal.
Command-line mode for instructions to test and evaluate many programs quickly.
Download Link:
https://courses.missouristate.edu/KenVollmar/MARS/download.htm
As of V4.0, MARS requires Java J2SE 1.5 (or later) SDK installed on your computer.
To download - https://www.oracle.com/technetwork/java/javase/downloads/index.html
Every MIPS program uses different memory segments Data Segment, Text Segment.
In this example, ‘mymessage’ is a variable. ‘asciiz’ this keyword stores the string “Hello World.” in the
data segment and adds a null character to terminate. ‘li’ means load immediately signifies that the machine
should be ready to print anything. The value ‘4’ signifies the data type to be loaded on the variable. ‘la
$a0,mymessage’ signifies that load the mymessage value into the register a0.
MIPS syscall is an individual instruction used to do a service. It is a “Software Interrupt ” to invoke OS for
an action. ‘syscall’ instruction provides many services. It may be to print a number or to terminate a
program.
To execute this code save the file, then go to the ‘Run’ menu then select ‘Assemble.’ If the program has an
error, then at the bottom, a message will be displayed regarding the fault. If it has no error, then a message
‘Assemble: operation completed successfully.’ Will be displayed. Then select the run option at the top. The
bottom message box will show the output of the program.