# 8051 external interrupt INT0 issue?

How do I write an ISR greater than 8 bytes which is triggered by INT0?

• You place a jump instruction at the address of the interrupt handler, which then allows the actual handler code to be placed anywhere in memory where there's enough room for it. – Dave Tweed Oct 5 '14 at 15:02
• ORG 0003H ; LJMP START; RETI like this? – user258699 Oct 5 '14 at 15:14
• What is that RETI for at that place? There is no return from a jump, so the RETI must be at the end of the code that you jump to. – Wouter van Ooijen Oct 5 '14 at 15:21

Your code jumps to the ISR which ends in a RETI:

    org 0003H
jmp isr

; ...

isr:
; any instruction you need
reti


If you program in C, this will be handled for you automatically. For example, Keil-C51 places ISRs right at the start address if there is enough room, or jumps to it if not.