P. 1


|Views: 260|Likes:
Published by ttt4234

More info:

Published by: ttt4234 on Jan 18, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





MARIE Simulator

Dr. Qi Zhu zhuq@uhv.edu

Introduction Install & Run MarieSIM Run MarieDP

Fall 2010

but y you will also get a taste of assembler g language programming without learning any particular assembly language beyond the simple instructions that textbook has presented. By running programs on this simulator. not simulator only will you see your programs in action.Introduction MarieSim is an environment within which you h h h can write your own programs and watch how they would run on a real "von Neumann von architecture" computer system. Fall 2010 .

Introduction (Cont. Fall 2010 . Students of Java may wish to look at the simulator's source code. and perhaps even supply improvements or enhancements to its simple functions.) MarieSim was written in the Java language so that the system would be portable to any platform for which a Java Virtual Machine (JVM) is available.

Simulator Features Support for the MARIE assembly language introduced in Chapter 4. An integrated text editor for program creation g p g and modification Hexadecimal machine language object code An integrated debugger with single step model. register and memory tracing A graphical memory monitor displaying the 4096 addresses A graphical display of MARIE s registers MARIE’s Fall 2010 . break points.

) Highlighted instructions during program hl h d d execution User-controlled execution speed U t ll d ti d Status messages User-viewable symbol tables An interactive assembler that lets the user correct any errors and reassemble t d bl automatically. Online help Fall 2010 .Simulator Features (Cont.

cfm Or WebCt -> Download softwares Use winzip.jar icon to invoke the MARIE simulator Fall 2010 .01.zip download page http://computerscience.jbpub.com http://computerscience jbpub com /ecoa/2e/student_resources.3.exe to extract and get MarieSim.jar Double click on the MarieSim.Install & Run Software MarieSim-v1.

Register Input/Output Assembly Code Memory States Fall 2010 .

1: Using a loop 4 1: to add five numbers Fall 2010 .An Object Example Example 4.

Invoke the code editor From the [File] menu on the menu bar. Fall 2010 . select [Edit] as shown in the illustration.

Enter the program source p g code. type your window MARIE assembly instructions. The MARIE editor supports basic editing functions such as cut and paste. Using the editor pop up window. t d t Fall 2010 .

Save the program source code. The simulator automatically saves the file with a . Select [Save] from the menu bar of the l [ ]f h b f h editor. mas extension Fall 2010 .mas extension.

message at the bottom of the editor will be highlighted. the assembly listing will pop up on the screen and the screen. a message displays at the bottom of the editor telling you that the assembly was successful. g g ted Fall 2010 . If your program contains no errors. successful If your file contains errors.Assemble the program source code Select [Assemble] from the menu bar.

Assemble the program source code successfully Fall 2010 .

Fall 2010 . right-hand From the main simulator pane select [Load] from the [File] menubar option. The file dialog pops up.mex) files in the current directory. showing you all of the MARIE executable files (.Load the program Close the editor window by selecting [File] Cl th dit i d b l ti [Fil ] [Exit] or by clicking on the close icon at the upper right hand corner of the editor panel. you must reload it. ac e easse e e. You can navigate through directory your directory structure if needed. Each time you reassemble a file.

Load the program Fall 2010 .

and set a delay between each instruction. This menu allows you to turn step mode off and on.Run the program Select any of the run mode options from the [Run] menu. Fall 2010 .

Run the program Fall 2010 .

Observe data path instruction execution Double li k D bl click on the MarieDP1.jar h icon to invoke the MARIE simulator Fall 2010 .

) needed ) Note: The data path simulator will load only executable (. A file dialog will appear that shows all fil di l ill th t h ll of the MARIE executable files in the currently logged directory (You can directory.Load an executable Marie file.mex) files that have ( mex) been assembled in the Marie simulator. navigate the directory structure as needed. Select [Load] f S l t [L d] from the [File] menu on th [Fil ] the menu bar. Fall 2010 .

) If you find that observing the instruction fetch part of the simulation becomes boring. ti l t [R ] [St ] If you select [Step]. This feature reduces the delay between machine cycles during instruction fetch only. a single fetch-decode-execute cycle is processed in the simulator. The machine cycle delay is restored for the rest of the instruction execution. you can turn "fast fetch mode" on.Run the program To begin T b i execution. you can select [Run] or [Step]. (You can stop the program during its execution. [Run] executes the program without pausing. Fall 2010 .

Run the program Fall 2010 .

doc Fall 2010 .More References QuickGuide.doc MarieGuide.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->