0% found this document useful (0 votes)
81 views9 pages

Experiment 1 COM ARCH

Uploaded by

Rodger Uche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views9 pages

Experiment 1 COM ARCH

Uploaded by

Rodger Uche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

EXPERIMENT No.

1: FAMILIARIZATION WITH MARIE SIMULATOR ENVIRONMENT

I. INTRODUCTION

Computer users and computer software


designers have seemingly insatiable desires for
improved features, easier interface usability,
and faster execution speeds. Thus, to keep pace
with market expectations, microcomputer
manufacturers continually increase the power
of their systems. In many ways, these systems
have surpassed the complexity of yesterday’s Figure 1: MARIE’s Assembly Language
million-dollar mainframe systems. While the
exponential growth of computing power has MARIE has five key registers, each serving a
been a boon for both the computer user and specific purpose. The Accumulator (AC) is used
the computer manufacturer, this trend has to store intermediate data during operations.
virtually eliminated the possibility of using these The Program Counter (PC) keeps track of the
systems as pedagogical tools. To do so is to run current position of the instruction being
the risk of students becoming mired in a executed, as each instruction has its own
plethora of proprietary details that serve only address. The Memory Access Register (MAR)
to obscure their understanding of the essential handles the addresses of data to be read from
functions of computer systems (Lobur, 2003). or written to memory. The Memory Buffer
Register (MBR) temporarily holds data as it is
MARIE ('Machine Architecture that is Really transferred to or from memory. Finally, the
Intuitive and Easy') is a basic machine Instruction Register (IR) contains the current
architecture and assembly language designed instruction that is being processed. Each of
just for learning, based on the book The these registers plays a crucial role in the
Essentials of Computer Organization and operation of MARIE, making it easier to
Architecture by Linda Null and Julia Lobur. The understand how data and instructions are
book also includes Java-based simulator managed within the system (Gallege, 2020).
programs for MARIE. MARIE.js is a version of
this simulator written in JavaScript. It tries to In conclusion, the experiment is designed to
stay true to the original Java simulators while introduce students to the MARIE simulator
adding features to make the concepts easier to environment and the Datapath Simulator,
understand. MARIE's assembly language is a providing students with a practical
simple version of the von Neumann understanding of basic computer architecture.
architecture, as shown below (Nyugen, Joshi, & By familiarizing students with the simulator's
Jiang, 2016). interface and menu options, students will gain
insight into how these tools facilitate the
learning of fundamental concepts. Additionally,
exploring the operands and directives used in
MARIE assembly language will enhance
students’ ability to write and interpret assembly
code.

II. METHODOLOGY

The MARIE Simulator and Datapath


Simulator are the two executable files. In MARIE Figure 2: The MarieSim Graphical Environment
Simulator, programs are assembled and
created, while the Datapath Simulator allows • MarieSim Controls Menu: Menu at the
you to view the registers and components used top of the simulator gives control over
throughout the program's execution cycle. the actions and behavior of the MARIE
machine.
In the first part of the experiment, guides • File Menu: Shows the MarieSim File
are written to help the students familiarize the Menu options while Figure 2.1 is the
functions of MARIE Simulator and Datapath built-in editor used for creating source
Simulator that will help the students in finishing codes.
the experiment as follows:

• Installation: To use the MARIE


machine simulator, download the
ZIP file, unzip it to obtain three JAR Figure 2.1: MarieSim File Menu Options
files, two DOC files (documentation
and quick start guide), a README
file, and three MARIE assembly • The MARIE Editor: MARIE assembly
code source files must have an ".mas"
programs. The simulator requires
extension, for MARIE Assembler.
Java 1.4.0 or later. You need the
Java Runtime Environment (JRE) to
run the simulator on Windows. For
the simulator, click the MarieSim
JAR icon or use the MarieDP1.jar for
the datapath simulator. The
software is free from java.sun.com.
• MarieSim Environment: Shows the
graphical environment of the MARIE
machine simulator.
Figure 2.2: MarieSim Editor

• Run Menu: The Run menu offers


several features that allow you to have
control over how your program is
executed by the simulator.

Figure 2.3: The Run Menu

• Breakpoints: Are flags placed on


computer instructions that tell the
system to pause execution at the
instruction where the breakpoint Figure 2.6: Setting as Registers Mode

• Data Path Simulator: Shows the


graphical environment of the MARIE
data path simulator.

Figure 2.4: Breakpoints

• Symbol Table: Display frame for the


small program loaded in the simulator.

Figure 2.7: MARIE Data Path Environment

Figure 2.5: Symbol Table

• Input and Output Modes: illustrates • Running a Program in a Data Path


register mode selection. Simulator: The MARIE data path
simulator will run only those programs
that have been assembled by the
MARIE assembler with the MEX
extension.
9. What are the options under the
Breakpoints Menu and what is it for?

10. What are the options under the Symbol


Map Menu and what is it for?

11. What are the options under the Help


Menu and what is it for?

12. What are the mode selections for the


output register?

Figure 2.8: Executing a Program in a Data Path Environment 13. What consists the MARIE Datapath
Simulator?
Several questions are asked in the
experiment to evaluate students' familiarity 14. What are the four directives recognized
with the MARIE Simulator and Data Path by MarieSim and what is it for?
Simulator as follows:
15. What is an operand and how is it
1. The screen of the MarieSim consists of represented?
four parts and what are they?
16. List down the MarieSim File Types.
2. What is inside the central monitor?
III. RESULTS AND DISCUSSION
3. How many addresses are there in the
memory monitor? Where can you find the With the help of MarieGuide, answering
memory DED? And what type of number system the questions becomes easier, as it provides
is used to represent the address? detailed explanations and guidance on
using the MARIE Simulator and Data Path
4. What status message may appear at the Simulator effectively. This ensures a clearer
bottom of the screen after execution? What do understanding of how to operate the tools
you think happens when you never see a and apply them to various scenarios in the
message? experiment. The questions are answered
sequentially.
5. What are the options under the File
Menu and what is it for? The MARIE Simulator is composed of 4
parts:
6. What are the options under the Run
Menu and what is it for? • Menu Bar
7. What are the options under the Stop Here is where you can find all the
Menu and what is it for? options for the Marie Simulator. Under the
8. What are the options under the Step "File" menu, you’ll see options like "Edit,"
Menu and what is it for? "Open," and others. You can use this area
to access the Marie assembler code editor
to input and manage your code and syntax. The central monitor is comprises by the
following:

• Program Monitor
Figure 3.1: Menu Bar
The Program Monitor shows the assembly
• Central Control code from the editor after the program is run,
displaying the code line by line. Users can set
This is where the program or syntax will be
breakpoints by checking the box on the left.
displayed after you write a program in the code
editor. Breakpoints are instructions that pause or
resume the program, helping users debug
specific sections rather than the entire
program, which is useful for applications with
many instructions.

Figure 3.2: Central Control

• Memory Control

This is where you can view the values of the


memory.

Figure 3.5: Program Monitor


Figure 3.3: Memory Control

• Message Area • Register Monitor

This is where messages will be The Register Monitor displays the values of
displayed, such as "Program is ready" or registers while the program is running.
"Program loaded."

Figure 3.4: Message Area


Figure 3.8: Memory Monitor

The status message will indicate whether


the machine stopped normally or abnormally.
This message means that the program has
ended due to the "Halt" opcode. However, if
there is no "Halt" instruction or certain
conditions are present, the application may
enter a loop. In such cases, the pause or stop
Figure 3.6: Register Monitor functionality may be needed.

The options under the File Menu are as


• Output Monitor
follows: When selecting the load option, a
While the Output Monitor shows the popup will prompt you to specify the location of
output, or the value stored in the accumulator. the .mex file or the correctly built program. The
edit option allows for the creation of assembly
code, while the reload option is used after a
program imported into MarieSim has been
disassembled and reassembled.

Figure 3.9: MarieSim File Menu

The options under the RUN Menu are as


follows:

• Run/Reset: This option runs the syntax


and resets the simulator to its initial
state.
• Stepping Mode: Activates the step
Figure 3.7: Output Monitor
mode or step button for executing the
There are 4096 memory addresses that program one step at a time.
• Set Delay: Allows you to set a delay up
can be seen in the memory monitor. The
to 3000 ms to observe program
memory DED can be found on the left side of changes.
the memory monitor and consists of • Core Dump: Used to dump the contents
hexadecimal values. These hexadecimal values of memory after a serious system error.
are used to represent memory addresses.
The Stop Menu consists of: • Typical Assistance: Provides general
help and support for using the MARIE
• Stop Button: The menu contains only Simulator/Data Path Environment.
the Stop button, which is used to halt
• About: Displays information about the
the program’s execution.
developer and the software.
The options under the Step Menu are:
The mode selections for are output
• Single-Step Execution: Allows the registers are as follows:
execution of one statement or step at a • HEX: Used for editing or modifying the
time within the program. Before using output of the register in hexadecimal
the step button, ensure that "Stepping format.
Mode" is enabled under the Run menu.
• ASCII: Used for editing or modifying the
The options under the Breakpoint Menu are: output of the register in ASCII format.
• Run to Breakpoint: Select this option to • DECIMAL: Used for editing or modifying
execute the program until it reaches a the output of the register in decimal
section or statement marked with a format.
breakpoint.
• Clear Breakpoint: Use this option to The MARIE Data Path Simulator consists of:
remove a previously set breakpoint,
stopping the program from pausing at • Menu Bar: Provides access to various
that specific instruction. options and controls for the simulator.
• Data Path Graphical Display: Visually
represents the components and their
interactions within the datapath.
• Machine Monitor Area: Displays
information about the machine's state
and operations.
Figure 3.10: Breakpoint Checkbox • Message Area: Shows status messages
and alerts related to the simulator's
Two options are under the Symbol Map activities.
Menu:
The four directives recognized by MarieSim are:
• Print: This option prints the contents of
the symbol map. • Origination Directive: Specifies the
• Dismiss: This option closes the symbol memory location where the program
map. will begin.
• Decimal (DEC): Allows the use of
The options under the Help Menu are: constants in decimal format.
• Octal (OCT): Allows the use of constants
in octal format.
• Hexadecimal (HEX): Allows the use of instructions are managed within a
constants in hexadecimal format. computer system.

An operand is any element that can be The findings of the experiment suggest
modified or is part of the instruction set, that the MARIE simulator is a highly
relating to either data or a memory address effective educational tool, especially in
where an operation is performed. It is simplifying complex concepts such as
represented using 4 hexadecimal digits. memory addressing, instruction execution,
and register operations. The comprehensive
The MARIEsim file types are:
guidance provided by the MARIE Guide
allowed students to navigate the simulators
• .mas: Used to save the program source
with ease, leading to a more thorough
code.
engagement with the material. This hands-
• .lst: Generated when there is an error in
on approach not only improved their ability
the program, typically containing a
to write and understand assembly code but
listing of the code with error
annotations.
also equipped them to apply these concepts
• .map: Created by the symbol table, in more advanced computing contexts.
providing a map of symbols and their
In summary, the MARIE simulator
addresses.
proves to be a valuable teaching resource,
• .mex: Produced after successful
assembly of the program.
effectively bridging the gap between
• .dmp: Generated by a core dump, theoretical knowledge and practical
showing the contents of memory after a application. The experiment highlights the
system error. significance of using simplified educational
models like MARIE to teach essential
IV. CONCLUSION concepts in computer architecture, ensuring
that students build a solid foundation before
The experiment effectively moving on to more complex systems.
introduced students to the MarieSim and
Datapath Simulators, laying the V. REFERENCES
groundwork for understanding basic
Gallege, H. (2020, May 12). Medium. Retrieved
computer architecture. Through practical
from Beginners Guide to MARIE
use of these tools, students gained Assembly Language:
valuable insights into the core functions https://medium.com/@manurahimsara
of computer systems. By working with /beginners-guide-to-marie-assembly-
the MARIE assembly language and its language-a22a8f04df8a
directives, and becoming familiar with
the simulators' various components, Lobur, J. M. (2003). MarieSim: A Simulator for
students were able to answer key the MARIE. Pennsylvania.
questions that deepened their
comprehension of how data and
Nyugen, J., Joshi, S., & Jiang, E. (2016, August
16). Introduction to MARIE, A Basic CPU
Simulator. Retrieved from MARIE.js:
https://marie.js.org/book.pdf

You might also like