Question: 6. (20 points) Given the following assembly program, show the progression of values stored in both the registers and memory locations. Use hexadecimal numbers
6. (20 points) Given the following assembly program, show the progression of values stored in both the registers and memory locations. Use hexadecimal numbers for all entries (may have to convert decimal to hex). Remember that the memory is byte-addressable, and registers are word-sized. ; This program finds and stores the maximum and minimum scores given. .data .byte 88, 92, 75, 100, 54, -1 .byte O .byte 0 .text scores: max: min: start: testMin: done: mov.w #max, R5 mov.w #min, R6 mov.w #scores, R4 mov.b @R4, 0(R5) mov.b @R4, 0(R6) mov.b @R4+, R7 tst.b R7 jl done cmp.b @R5, R7 jl mov.b R7, 0(R5) cmp.b @R6, R7 jge start mov.b R7, 0(R6) jmp start jmp $ testMin ;sets max = first number ;sets min = first number R4: R5: R6: R7: Symbol table: scores max min Memory: 2400 2406 2407 1 pt 1 pt 1 pt 1 pt 2400 2406 2407 2 pt 2 pt 2 pt 2 pt 2 pt 2 pt 2 pt 2 pt
Step by Step Solution
3.49 Rating (159 Votes )
There are 3 Steps involved in it
Answer R4 1 R5 64 R6 66 R7 1 Symbol Table Scores 2400 Max 2406 Min 2407 Memory 2400 ... View full answer
Get step-by-step solutions from verified subject matter experts
