105 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
77
views
Perform addition, subtraction, multiplication or division based on user choice. Why when user chooses addition, a subtraction is executed?
I am trying to create a MARIE Code that waits for an INPUT from a user that is a decimal number, waits for another INPUT that are ASCII characters +,-,*,/ (being Dec 43, Dec 45, Dec 42, DEC 47) and ...
0
votes
1
answer
65
views
Why this MARIE code doesn't stop the loop when loop variable reaches 10?
I am tasked to write a program that takes an integer as input, and then prints all integers between that value and 10 as an increasing sequence. After that output, it should also print the count of ...
-3
votes
1
answer
66
views
Input a number from the user and store it in a memory location (X) , loop as long as long as the value is less then 10
Example: if the entered value is 5, the values 5,6,7,8,9,10 (one number per line)
will be displayed followed by the number of iterations. Note that the number 10
should be displayed.
I tried many ...
-1
votes
1
answer
142
views
multiplication and division with marie
where is the mistake here , exactly in the the division , it returns the value of input x not return the result of the division
ORG 100
Input
store x
input
store y
/ Summation
Load x
Add y
Store ...
0
votes
1
answer
179
views
What is the error I have in my MARIE code for sorting an array?
I am trying to solve the following task:
Write an assembly code in MARIE to sort the following numbers (Hexadecimal) from maximum to minimum.
Numbers (HEX): 5, 35, 75, 45, 85, 25, 95, 55, 15, 65
You ...
-1
votes
1
answer
161
views
How to read the Marie Programme table? [closed]
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
...
-3
votes
2
answers
79
views
I need to create a static Linked List in Marie assembler
I am working on the following task:
Create the following static Linked List in Marie assembler, and add Marie code, using loop to traverse the list and display each node value such as 9, 4, 14. end ...
0
votes
2
answers
282
views
How to print only five elements from an array in marie assembly language
I need to print only 5 elements of an array in marie
I tried to but it just looped
ORG 100
Main, Load X // Load the address of the array
Store Addr
Load 5 // ...
0
votes
1
answer
178
views
Marie Simulator: program that performs integer division on positive numbers
I am tasked to write a program that performs an integer division on two positive numbers X and Y:
quotient = X % Y
remainder = remainder of division
display quotient and remainder
if X or Y is <...
1
vote
1
answer
81
views
Where is my logic error in my MARIE program?
I am trying to write a MARIE program that prints out the word "Grade " then the user enters an exam score and then your
program displays the letter.
So a user will start your program, the word "Grade "...
0
votes
0
answers
55
views
Marie z=x+1 until it reaches 20
Here I have a loop in Marie. The loop goes from 1 to 20 and it's supposed to stop on 20. My problem is that I want to print in a individual memory address each value from 1 to 20 consecutively but in ...
0
votes
1
answer
147
views
MARIE, multiply 2 numbers and divide final result by 2
/len = length, hei = height
/get and store input
input
store LEN
input
store HEI
/start of loop
/load in the value of len
LOOP, load LEN
/add len to num
add NUM
/store the value in num
Store NUM
/...
0
votes
0
answers
38
views
Code prompts user for an input when an input isn't in the code
So i wrote this MARIE code and every time I try to run it it prompts me to enter an input when I never put Input anywhere in the code. The code is supposed to call 2 subroutines PUSH and POP where ...
0
votes
0
answers
310
views
MARIE Assembly finding the product of two number with subroutine using JNS function
I want to find the product 2*3 with subroutine but my program goes on infinite loop. Below is the code in MARIE assembly language. I think the logic is okay but I don't know where is the problem that ...
1
vote
1
answer
498
views
How to declare specific address as a variable
In Marie assembly, how can I declare a specific address as a variable?
x should have a value of hex 2c and value should be at address 0015
Currently, I have code:
load x
add x \ 2x
store x
halt
x,...