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
2
votes
1 answer

How to compare two numbers

I'm having trouble comparing two numbers in MARIE (Machine Simulator Environment), for some reason I just can't seem to get my head around it. All I need the code to do is; allow the user to input 2 numbers then compare them and if the two numbers…
BradBeighton
  • 83
  • 1
  • 9
2
votes
1 answer

What type of object does "getResults()" return in docrine query

When I execute query using find(id) then it works OK. But when I use createQuery method like select u from User u where u.id = 1 then I get error that it is an array. So I want to know if it always returns an array even if the result is 1? I tried…
Mirage
  • 30,868
  • 62
  • 166
  • 261
1
vote
1 answer

MARIE: My Skipcond 400 doesn't seem to stop the program from barreling through the loop =C What is wrong here, I do not even know?

Input Store b Output Input Store c Output Loop, Load a Add b Store a Load c Subt i Store c Output Skipcond 400 Jump Loop Load a Output Halt a, DEC 0 b, DEC…
a124c41
  • 21
  • 1
  • 4
1
vote
0 answers

Sort hex numbers largest to smallest using Marie assembly language

sorting hex numbers largest to smallest i started by taking my first value and storing it into my increment variable so i can know my position throughout the code. I than take that increment variable(a)e and add one to it. this changes my position…
1
vote
2 answers

Is there a way to determine whether or not a number is even or odd using marie assembly language?

Normally you would just use modulus to determine this but since that is not an option I tried to use a repeated subtraction loop and utilized skipcond400 to determine if the value was equal to 0. This was perfectly fine if every time i were to input…
Sub-Z
  • 13
  • 2
1
vote
1 answer

In MARIE assembly, why does MAR sometimes contain PC-1 (as in contents of PC minus 1), but not all the time?

I'm kinda new here so I'm trying to figure out the basics first, so I'm looking into MARIE assembly, I noticed that MAR sometimes is just the value of PC but minus 1, is there a reason behind this or is it just a coincidence? Looking into it now, I…
1
vote
1 answer

In Marie.js how would I go about doing an if statement and loop for the following pseudocode?

max = 0 value = 0 LOOP INPUT value IF (value == 0) EXIT LOOP ENDIF IF (value > max) max = value ENDIF ENDLOOP PRINT max STOP I am using https://marie.js.org/ but i'm having a lot of trouble trying to figure…
ScubaSteve
  • 33
  • 6
1
vote
0 answers

Size of main memory in Wobmat?

What is size of main memory in Wombat. And what is size of main memory in MARIE. Is it 4K×16 for both. But isn't word size In Marie is 8 bit . and 16 in wombat?
1
vote
0 answers

Can't Open Marie Simulator

Mariesim.Jar file will not open. I have jdk and jre set up correctly. I have another computer that will run it fine. It opens the simulator with "Java SE Platform Binary." That option is not available with this computer. I have Jdk and jre 10.0.2.…
1
vote
0 answers

How to trim string in MARIE?

Hi I'm new to Marie assembly language. I'm trying to trim the white spaces at the end of a string. I have a print subroutine that stops printing once it reaches a 0 character so to trim the string at the ends I iterate to the end of the string, get…
Sook Lim
  • 541
  • 6
  • 28
1
vote
0 answers

How to trim white spaces at the end of a string in Marie?

Hi I'm new to Marie programming language and I have a string with the address NameAddr. My print subroutine stops printing when it reaches a 0 character (marking the end of the string).So to trim the white spaces I simply iterate backwards from the…
Sook Lim
  • 541
  • 6
  • 28
1
vote
1 answer

Marie Removal of space

I am new to MARIE. I am creating a Marie Code which will remove the "space" in between elements. For example. if it is ~~FIT ~ 1047~~~, it would remove the elements ~~~~. Can anyone please take a look at my code and guide me? I understand that when…
Rana
  • 11
  • 2
1
vote
1 answer

MARIE calculator not working as intended

I need to write a code in MARIE for a calculator that takes 2 numbers x and y, prints > x + y = z. The calculator isn't intended to calculate double digit answers. The problem I'm having is everything works, except the result will be a random ASCII…
Mike J
  • 93
  • 1
  • 8
1
vote
0 answers

2 subroutines in marie

I need a Marie file with 2 different subroutines operating. The first is printing a string that I enter into the code, and the second is printing a string that the user inputs 1 character at a time. I've got them both working separately, but when I…
user9673560
  • 11
  • 1
  • 4
1
vote
1 answer

Marie Simulator- How to use MarieSim?

I am very new to using Marie simulator, and if anyone could help, it would be great. the following program: ORG 200 If, Load X Subt Y Skipcond 400 Jump Else Then, Load Y Store X Jump Endif Else, Load Y add X Store Y Endif, Output Halt Two, Dec 2 X,…