If an interrupt occurs then what code it will execute?
Where can I write the code for the interrupt?
Will I use it like I use a CALL command, like this:
Then interrupt vector is adress 0x0004. So when interrupt occurs the pic will jump to this adress. You can force code to this adress with the org command
ORG 0x0004
;context saving
;Your interrupt code
;context restoring
RETFIE
As a result your program entry (the program start, at adress 0) should contain a jump over the interrupt vector within the first 4 instructions