Q# 3(a): What will be the value of accumulator register if PC=900, PC=901, PC=902, PC=903, PC=904, PC=905, PC=906 and PC=907? [3.0 Marks] Memory Partial list of operation codes 900 7999 0111 Load AC from memory 901 3997 0011_Store AC to memory 902 6998 903 9999 0110_Add to AC from memory 904 3997 1001 _ Sub to AC from memory 905 6997 906 9996 907 9998 996 0001 997 0003 998 0004 999 0005 (b) A user program starts execution at t=0sec, a scanner interrupt is call at t=16 sec during interrupt handling another camera interrupt has been call at t=21 sec and returns at t=35 sec, at a same time another printer interrupt is call and return at=43sec to scanner interrupt handler. Scanner interrupt returns at t=53 sec. Calculate the total time required to process interrupt. [2.0 Marks)

74 0

Get full Expert solution in seconds

$1.97 ONLY

EXPERT ANSWER

a)

PCInstructionOpCodeActionValue of ACComments
90079990111AC = M[999] = 00055
90139970011M[997] <- AC5M[997] becomes 5
90269980110AC = AC + M[998]5+4 = 9
90399991001AC = AC – M[999]9-5 = 4
90439970011M[997] <- AC4M[997] becomes 4
90569970110AC = AC + M[997]4+4 = 8
90699961001AC = AC – M[996]8-1 = 7
90799981001AC = AC – M[998]7-4 = 3

b)

Total time to process interrupt = total time for scanner interrupt + total time for camera interrupt + total time for printer interrupt

total time for scanner interrupt = (21-16) + (53-43) = 15s

total time for camera interrupt = 35-21 = 14s

total time for printer interrupt = 43-35 = 8s

Total time to process interrupt = 15 + 14 + 8 = 37s