Questions tagged [marie]

MARIE (Machine Architecture that is Really Intuitive and Easy) allows you to learn the essential concepts of computer organization and architecture, including assembly language, without getting caught up in the unnecessary and confusing details that exist in real architectures.

MARIE is a toy architecture for teaching / learning assembly language, with a very small instruction set (just load/store, add/sub, jump/jump-and-link, conditional execution of next instruction, and user input/output.) It's an accumulator machine with one 16-bit accumulator.

Resources:


Implementations:

91 questions
1
vote
1 answer

How can I find even numbers using MARIE?

I'm working on a project but I'm stuck. I'm trying to write a snippet of code that checks if the given number is even by subtracting it by 2 (the given number cannot be more than 6). If it's even it prints a 0, if it's odd it prints a 1. int…
Grace D
  • 15
  • 5
1
vote
1 answer

MARIE assembly: creating a program that calculates which day of the week one was born on

This is part of a homework assignment. I am not asking anyone to specifically do the homework for me because I would like to learn myself; however, can anyone elaborate as to how I would go about doing this? This is our second assignment, and…
1
vote
0 answers

Is this MARIE instruction set even possible?

I was given the following MARIE instruction set and told to output what the symbol table was for the first pass, and the result in the AC. The problem is, I don't even think this is possible: Hex Address Label Instruction 100 Start,…
Armani
  • 23
  • 1
  • 6
1
vote
1 answer

How do I print a string in one line in MARIE?

I want to print a set of letters in one line in MARIE. I modified the code to print Hello World and came up with: ORG 0 / implemented using "do while" loop WHILE, LOAD STR_BASE / load str_base into ac ADD ITR …
Peeves
  • 19
  • 1
  • 3
1
vote
1 answer

Marie command line interpreter

Is there anywhere a command-line interpreter for the MARIE assembly? I realise it is a simple task to implement one, but I am on the process of grading students work and wanted to know if there is a tool that can help me automate this procedure. I…
user27221
  • 334
  • 3
  • 16
1
vote
1 answer

MARIE code both if and else conditions are executed

I have been asked to do the following: Write MARIE code to perform the following program excerpt. If (x < y + z) { x = x – y; z=z+1; } else y=y-1; Instructions: - Use “ORG” instruction to start your program at address 200. - The following labels…
Abdullah
  • 147
  • 2
  • 12
1
vote
1 answer

print odd numbers in MARIE assembly language up to user input value

It is a homework and I'm stuck here. Any help is appreciated. I'm trying to print odd numbers up to a user input value (say 6 or 7). I have the following code which kind of does what I want but not exactly. Here is my code: org 100 input …
1
vote
2 answers

M.A.R.I.E divide one number by another

I'm learning assembly using the MARIE program but I can't figure out hot to do this question from the book: Divide one number by another and store the quotient and the remainder in two different memory locations. This is what I have so far, what…
Michael Quiles
  • 1,131
  • 3
  • 24
  • 41
1
vote
1 answer

How to do multiplication and then addition in Marie simulator

Iam new in Marie simulator. I know how to add in the simulator, but unfortunately I don't know how to multiply. for example how can I put a code for this: S=x*Y+z Thanks in advance
Ahmed
  • 11
  • 4
1
vote
1 answer

Marie simulator looping when not meant to after storing inputs

I have written this very basic Marie code for multiplying two numbers, X and Y. I built it without the first 6 lines and would just assign X and Y decimals to test the program but realized I need to allow the user to input the numbers. Now when I…
lopu
  • 175
  • 1
  • 18
1
vote
1 answer

3 Number multiplication in MARIE Sim

I am currently working on the MARIE SIMULATOR and I am attempting to get three inputted decimals, and multiply all of them together. For some reason my code keeps spitting out answers that are way larger then expected. For instance 2 x 2 x 2 gives…
Cigaro
  • 51
  • 1
  • 7
1
vote
1 answer

What my MARIE Sim Jump function is not working correctly

I am currently working on the MARIE SIMULATOR and I am attempting to get three inputted decimals, and multiply all of them together. I save my code as .mas and attempt to assemble it. It says I have 1 error but the Assembly listing comes up…
Cigaro
  • 51
  • 1
  • 7
1
vote
1 answer

Writing this MARIE program

For this question, I'm not sure if I've done it correctly (no solutions were provided): Consider the program segment: X = 3 If(X > 0) { Y = X } Stop Write the mnemonic assembly code for this program segment, using MARIE's instruction set. I…
aqibjr1
  • 651
  • 5
  • 21
1
vote
0 answers

Simulating Arrays in Marie

I'm tinkering around with the MARIE assembly language, but I can't find a way to simulate array functionality. I'm trying to write a program to find the dot product of two vectors (arrays) and I can't figure out how to get an arbitrary list of…
Robert Crawford
  • 205
  • 1
  • 2
  • 11
1
vote
1 answer

Assembler for Marie

I want to write an assembler for marie, however I am stuck right in the beginning. My machine code has to have following format: FFFF 'first address' 'last addres' '... commands' Let's say we have a code like this: LOAD 104 ADD 105 STORE…
user3885166
  • 217
  • 2
  • 11