Assignment 4 Write MARIE assembly to do this program, using iteration and if/then/else. You will use two data values, one called NUM, initialized to 4. And one call RELST, that stores the result of...

1 answer below »
Just wanted to see if anyone knew anything about MARIE


Assignment 4 Write MARIE assembly to do this program, using iteration and if/then/else. You will use two data values, one called NUM, initialized to 4. And one call RELST, that stores the result of the calculation, initialized to zero. You will also need some other variables (your figure out). CTRL = 0 FOR I = 0 to 9 If CTRL == 0 RELST = RELST + NUM CTRL = CTRL + 1 ELSE RELST = RELST -1 CTRL = CTRL -1 “Play Computer” to execute your program virtually (logically on paper) to see what the correct answer should be. Upload to D2L your assembly program and the expected answer. Assignment 3, CS 5020 Name:_________________________________ There is a lot of material in this quarter, so not all can be reinforced through an assignment. These are some important areas that will also show up on the final exam. 1) Mini-Cache Problem 10 points) 32 bytes of memory. 16 bytes of set-associative cache, where blocks can go anywhere within the set. Block is 4 bytes, set in cache is two blocks. Populate memory starting with 0-9, then upper case letters. Hint- with full associativity in the set: each block has its own set of Tag bits. Memory is not organized by sets but by blocks, though blocks are assigned to sets and load in the cache in the correct set. The following address requests will load the cache: • 10000 • 10111 • 00111 • 00001 The CPU then generates address 10110. If this address is in the cache, respond with the requested byte.
Answered 2 days AfterOct 31, 2021

Answer To: Assignment 4 Write MARIE assembly to do this program, using iteration and if/then/else. You will use...

Gaurav answered on Nov 03 2021
112 Votes
ORG 100
    LOAD Zero    
    STORE RELST    / RELST = 0
    STORE CTRL     / CTRL = 0
    STORE I      / I = 0
    
LO
OP, LOAD CTRL    
    SUBT Zero     / if (CTRL == 0)
    SKIPCOND 400 / skip following instruction if CTRL != 0
    JUMP CTRL_NOT_ZERO / jump if CTRL != 0
    ADD One    
    STORE CTRL / CTRL = CTRL +...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here