Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I dont need the answer for 23, just provided it for 24. 24. What INT instruction

ID: 3914462 • Letter: I

Question

I dont need the answer for 23, just provided it for 24.

24. What INT instruction is required in question 23? 23. Figure 5.12 shows the contents of a few locations within the interrupt vector table. What will the new program counter be when the interrupt that uses these locations is processed? For Question 23 Memory Data FIGURE 5.12 Address 00300 34 003C1 12 00302 80 00303 04 28. What do you imagine are some of the problems with these two interrupt service routines: ISR1: PUSH AX SR2: PUSH AX PUSH BX PUSH CX body POP BX POP AX RET POP AX IRET

Explanation / Answer

Interrupts are implemented using a stack, in stack elements are pushed on top of the stack and popped from the top of the stack.

ISR1:

Here AX is pushed first then BX, now BX is at the top of the stack at the top. The pop instruction is trying to pop AX but AX is not at the top of the stack and can not be popped first BX will be popped then AX.

ISR2:

First AX is pushed then CX, now CX is at the top of the stack. The pop instruction is trying to pop BX which is not present in the code. Hence there will be error.