I want to know how i can read the Marie Simulator table. Im still a beginner to this so can someone explains how the output works in this following example code?
Load x
add y
store z
halt
x, hex 008E
y, hex 0D80
z, hex 000
I just assembled the code and run the programme but I don't know how to read it.
First, as @Tangentially Perpendicular, has edited your question, many assembly languages depend on individual lines for content.
Next, your program turns into the following bits, some of which are machine code encodings for instructions and others simply data values.
In hex:
1004 3005 2006 7000 008E 0D80 0000
The 1004 through 7000 are your machine code instructions encoded in MARIE form.
Location 00 01 02 03
Machine Code 1004 3005 2006 7000
Load 4 Add 5 Store 6 Halt
Where the 4 in 1004 refers to x
, 5 in 3005 to y
, and 6 in 2006 to z
, see next section.
The 008E through 0000 are data, initialized variables or constants.
Location 04 05 06
Data Value 008E 0D80 0000
Variable x y z