Question: show generated object file assuming there are no errors Insymbol Section ( 1 entry ) result 1 0 Outsymbol Section ( 2 entries ) get

show generated object file assuming there are no errors
Insymbol Section (1 entry)
result 10
Outsymbol Section (2 entries)
get425
get423
Object Code (11 words)
export answer
jmp mainx 20
answer:
word 10
lock:
word 0
main 20 :
Idimm r5,100
Idimm r4,0 # loop counter
Idimm r6,1 #loop counter increment
Idimm r7,5 # upper bound
doitagain:
# busy wait on the lock
Idimm r1,1 # want to set the lock to 1
tryAgain:
Idimm r2,0 # need to wait until lock is 0
cmpxchg r2,r1, lock # if lock is 0 then lock it
beq r2,r1, tryAgain # else r2 will be set to 1, and if so repeat
load ro, answer # now have exclusive control
addi r0,r5 # so safe to add in the local answer
store r0, answer
Idimm r2,0 # unlock
store r2, lock
addi r4,r6
blt r4,r7, doitagain
# all done!
halt
 show generated object file assuming there are no errors Insymbol Section

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!