Professional Documents
Culture Documents
CSA Lab Report 3
CSA Lab Report 3
BANGLADESH
COURSE NAME: COMPUTER SYSTEM ARCHITECTURE
Group Number: 02
EXPERIMENT NO: 03
MARKS:
The objective of this experiment was to obtain the knowledge required to enter, assemble, and
execute a program in MARIE Simulator. MarieSim was a rich graphical machine simulation
environment. Its features were best appreciated after we had experimented with a few simple
programs. There were some specific steps required to enter, assemble, and execute a program.
There are four directives that the MARIE assembler recognizes. The first of these is the
origination directive, ORG. The ORG directive controls the starting address of your program. If
one does not include an ORG directive in your code, the first address of the program is
automatically 000h. (Note: On a real machine, one could not count on this, which is why
origination directives are used.) If one wants the first address of the program to be 010h, one
would place the directive, ORG 010 at the beginning of the program. The ORG directive must be
the first statement of the program, otherwise, the assembler will give an error.
The other three directives enable one to put constants in the program as decimal (DEC), octal
(OCT), and hexadecimal (HEX) numbers. These constants must be valid for the radix stated in
the directive. For example, the statement, OCT 0900, will give an error.
Recalling that MARIE's word size is 16 bits, and all constants are assumed to be signed numbers.
Therefore, the valid range of decimal constants is decimal –32,768 to 32,767 (8000h to 7FFFh).
So, in MARIE (as well as in other architectures) we have a collection of registers. These registers
are shown below:
Task 2: Finding the Sum of 3 Numbers named A, B and C where one entry is from keyboard
References:
[1] Null and Lobur, Jones & Bartlett, Essentials of Computer Organization and Architecture, 1st
edition