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

Instruction Encoding relating to MARIE Assembly language

I am dealing with the following problem: A 1 address computer is one whose instruction can contain at most one operand address. MARIE is an example of such a computer. Typically each instruction is stored as a single word in the memory. Assume the…
JmanxC
  • 377
  • 2
  • 16
1
vote
4 answers

Divide using Marie Simulator

I am having trouble figuring out the dividing for the Marie Sim. I do not want the -1, but it keeps showing the negative. I only want it up to 2. Any suggestions? This is my code: ORG 100 Input Store x Input Store y loop, load x Subt …
1
vote
1 answer

testing in a while loop (MARIE)

I'm trying to write a while loop, while N > 5. While I understand just making a loop point and jumping back to it, how should I write a skipcond test for N > 5? I looked at the one other MARIE question regarding while loops, but didn't quite get an…
Monobus
  • 137
  • 1
  • 2
  • 13
1
vote
2 answers

I cant figure out why this MARIE Sim code wont work properly

So, I'm running into an issue when working with the MARIE simulator. Here is the prompt: define a decimal variable X and set X = 0 define a decimal variable Y and set Y = 0 Input a number in decimal form from the keyboard store the number in…
Monobus
  • 137
  • 1
  • 2
  • 13
1
vote
1 answer

the output of marie assembly code

I have this code written in MARIE assembly language: Org 100 Load X Subt Y Store Z if, Skipcond 000 Jump Else Then, Clear ADD Z Else, Output Halt X, DEC 10 Y, DEC 15 Z, DEC 10 and when I run this code in MARIE it gives the output = FFFB,…
user2521365
  • 131
  • 3
  • 17
1
vote
1 answer

Skipcond in MARIE Assembly Language

I have the following code: ORG 100 LOOP, Load X Add Z Store X Load Y Skipcond 400 Jump Q Subt Z Store Y Jump LOOP Q, Output X Halt X, Dec 0 Y, Dec …
basica
  • 67
  • 1
  • 2
  • 11
0
votes
1 answer

How would I take a simple program to multiply two numbers in MARIE assembly and rewrite it in a language readable for a one address VM

I am tasked with writing code for a VM written in the C language. It can read in a file and perform operations based on the file input. From the example I've been given, it seems the first number of each instruction pertains to a command (1 - load,…
0
votes
1 answer

How to correct MARIE simulator assembly code to correctly output z when z = a*b*c

ORG 100 Input, Input / Read input value Store A / Store input value in A Input / Read input value Store B / Store input value in B Input …
kalypso
  • 1
  • 1
0
votes
0 answers

Marie assembly Code from average to subtraction

Could someone can solve this question, i can't change it to subtraction. Could someone help even though i change the code. LOOP, LOAD X SUBT TEN SKIPCOND 000 /if X = 10 JUMP LOOP2 /take average after X = 10; CLEAR …
0
votes
0 answers

Subroutine to convert inputted string into lowercase letters

I am trying to make a subroutine that takes inputs from another subroutine and turn them into lowercase letters. ` Load StringAddress Store AddressString JnS subInputString JnS subToLower JnS subPrintString Halt StringAddress, HEX 287 / This…
RedRazor
  • 1
  • 1
0
votes
0 answers

I keep running into this issue with Marie

I keep running into this issue in https://marie.js.org where it wouldn't assemble and give the error. The prompt is to write a MARIE program that finds the largest value in an integer array. The user should input 5 values into an array. Output will…
0
votes
1 answer

finding out if there is a pair of elements in the array that sums to exactly K

i am trying to write a for loop using MARIE that can find a pair of integers that sum to k. then it must output the index of the two numbers that add up to k. For Example: Input: [3, 7, 11, 5, -2, 1] Target K: 12 Output: 1, 3 Because Num[1] + Num…
crystle00
  • 1
  • 2
0
votes
0 answers

I need to convert HEX into binary using MARIE only?

I need to create a program in MARIE assembly language where I input a HEX and it will convert into a binary. I am trying to implement a left-shifting register. I could use arrays but MARIE does not support accessing single bits of a number. I wonder…
0
votes
1 answer

How to find 1's complement in MARIE?

I'm trying to write Checksum Algorithm using MARIE.js, but I'm stuck on doing 1's complement. I saw other assembly languages have CMA code, but I couldn't find that information on MARIE. Thus, I typed G that opcode is 2F to find the checksum byte…
xeecq
  • 1
  • 1
0
votes
0 answers

Logarithms in MARIE

How would I write a MARIE Assembly code that calculates logarithms. Input A and STORE A Input B and Store B. Enter in 2 in A and 16 in B would print a result and show an output 4. Log base 2 of 16 = 4.