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
7
votes
2 answers

How does `Skipcond` work in the MARIE assembly language?

I am trying to understand the MARIE assembly language. I don't quite understand skipcond for doing things like <, or >, or multiply or divide. I am taking this simple program: x = 1 while x < 10 do x = x +1 endwhile; What I don't understand is how…
user249375
4
votes
1 answer

Does this MARIE code find the lowest number in an array?

I believe i did this correct, can anyone double check on the work. And if it is correct where should I look to verify that it is picking the right number. So i am trying to give the array and see which one is the smallest number out of that array. …
Renuz
  • 1,587
  • 7
  • 21
  • 34
3
votes
1 answer

How to initialize global data as pointer referring to a label?

MARIE relies heavily on (global) pointers in data: its only indirection capability is to deference a memory location, via AddI, JumpI, LoadI, and StoreI. Common sequence for example, is to LoadI pointer for dereference, then Load pointer; Add One;…
Erik Eidt
  • 23,049
  • 2
  • 29
  • 53
2
votes
1 answer

Understanding the Skip Condition in Assembly Language

Well first off this is Marie Assembly Language. Here what i have so far : I can easily accept input from user etc.... now what i want to do is each time the user enter a char suppose an integer i would like to compare it to '0' and then increment…
Shawn ricshawnawic
  • 147
  • 2
  • 5
  • 13
2
votes
1 answer

MARIE assembler - how to multiply

I want to write a simple M.A.R.I.E. program to evaluate the expression A x B + C x D. Now, there's not alot of info on Marie assembly language. I am not sure if there is a multiply? If not, would I have to loop or something to get it to multiply? I…
user249375
2
votes
1 answer

Marie not printing final output

I am writing a code to multiply three numbers. A x B x C = Z You have to input all the initial values. There is a detriment variable as well P. You input in this order A B C Z P... A B & C can be anything. Z is entered as 0 and P as 1. (If you can…
Tzarl
  • 21
  • 2
2
votes
1 answer

MARIE ASM Lang - division on integers (positive/negative)

For learning purposes I am trying to write any integer division in MARIE. This is standard (hopefully correct) code that divides X by Y with remainder, but only with positive integers. LOAD X STORE REMAIN WHILE SUBT Y …
Ernio
  • 948
  • 10
  • 25
2
votes
1 answer

Division using repeated subtraction in MARIE

I am trying to write a program in the MARIE assembly language that will divide two numbers using repeated subtraction. I need to count the number of subtractions needed before reaching zero or minus numbers. I am having a few problems with this,…
Ryan Dodd
  • 23
  • 1
  • 7
2
votes
1 answer

Reset command in MARIE?

I have a program here that creates an array of 10 integers and asks the user to create the limit for the numbers being evaluated. For example, inputting a 7 will evaluate numbers 1-7 in the array. Due to my indexing methods, I start at 1, not 0. Of…
2
votes
1 answer

Cubing Numbers with Repeated Addition in MARIE

I'm trying to write a subroutine for MARIE that will cube a number using repeated addition. I know I need to add the number by itself equal to its amount three times (so if its 4 I'll need to add 4 to itself 4 times, times 3). I don't have a real…
DNH
  • 29
  • 5
2
votes
1 answer

Calculating Average, Finding Min/Max in Marie Assembly Language

I'm trying to figure out a way to store the min and max of 10 numbers that are input by the user. I'm not searching through an array of numbers but rather I want to compare each input number that comes in before I add it to the other numbers. The…
flowinwind
  • 69
  • 1
  • 11
2
votes
1 answer

How to spot MARIE errors?

After assembling current file in MARIE. If I'm prompted with an error, how can i spot which line the error is directed at? Also I'm working on an assignment that requires me to input length and width from the user and output perimeter or area. So…
2
votes
0 answers

MARIE simulator; How to check if an addition of numbers was too big to be held in the accumulator

I have to write a program in the MARIE simulator (which I think just uses ordinary assembly language) that takes in 10 numbers from the input register and adds them together. I also have to check each time if the addition is too big to be held in…
Scott Kelly
  • 21
  • 1
  • 4
2
votes
0 answers

How to write a stack organized program with MARIE

I am writing a program that will evaluate the statement below, but I have to do it with a stack organized computer. This means that only pop and push can access memory. How would I do this while using this program as a sample for my program?: …
Eric after dark
  • 1,768
  • 4
  • 31
  • 79
2
votes
3 answers

MARIE Assembly If-Then

Pseudocode: if x > 1 then y = x + x; x = 0; endif; y = y + 1; I am tracing the MARIE code below based from the pseudocode: ORG 100 IF, LOAD X SUBT ONE / What is this for? SKIPCOND 800 JUMP ENDIF THEN, LOAD X …
k_rollo
  • 5,304
  • 16
  • 63
  • 95
1
2 3 4 5 6 7