Microprocessor Simulator 0 Help



Download 1.18 Mb.
Page62/82
Date18.03.2021
Size1.18 Mb.
#56105
1   ...   58   59   60   61   62   63   64   65   ...   82
sms32v50 (3)
sms32v50 (3), sms32v50 (6)

Calling an Interrupt


This is quite complex. The command INT 02 whether triggered by hardware or software, causes the CPU to retrieve the contents of RAM location 02. After saving the return address onto the stack, the instruction pointer IP is set to the address that came from RAM.

The interrupt code is then executed. When complete the IRET command causes the return from the interrupt. The CPU instruction pointer IP is set to the address that was saved onto the stack earlier.



Hardware interrupts differ slightly from software interrupts. A software interrupt is called with a command like INT 02 and the return address is the next instruction after this. IP + 2 is pushed onto the stack. Hardware interrupts are not triggered by an instruction in a program so the return address does not have to be set past the calling instruction. IP is pushed onto the stack.

Download 1.18 Mb.

Share with your friends:
1   ...   58   59   60   61   62   63   64   65   ...   82




The database is protected by copyright ©ininet.org 2024
send message

    Main page