; isr.asm - ISR assembly stubs

global isr0, isr1, isr2, isr3, isr4, isr5, isr6, isr7, isr8, isr9, isr10, isr11, isr12, isr13, isr14, isr15
global isr16, isr17, isr18, isr19, isr20, isr21, isr22, isr23, isr24, isr25, isr26, isr27, isr28, isr29, isr30, isr31
extern isr_common_handler

section .text

; ISRs 0 to 13 (no error code pushed by CPU)
isr0:
    cli
    push 0             ; Push error code (none for isr0)
    push 0             ; Push interrupt number
    jmp isr_common_handler

isr1:
    cli
    push 0
    push 1
    jmp isr_common_handler

isr2:
    cli
    push 0
    push 2
    jmp isr_common_handler

isr3:
    cli
    push 0
    push 3
    jmp isr_common_handler

isr4:
    cli
    push 0
    push 4
    jmp isr_common_handler

isr5:
    cli
    push 0
    push 5
    jmp isr_common_handler

isr6:
    cli
    push 0
    push 6
    jmp isr_common_handler

isr7:
    cli
    push 0
    push 7
    jmp isr_common_handler

isr8:
    cli
    push 0
    push 8
    jmp isr_common_handler

isr9:
    cli
    push 0
    push 9
    jmp isr_common_handler

isr10:
    cli
    push 0
    push 10
    jmp isr_common_handler

isr11:
    cli
    push 0
    push 11
    jmp isr_common_handler

isr12:
    cli
    push 0
    push 12
    jmp isr_common_handler

isr13:
    cli
    push 0
    push 13
    jmp isr_common_handler

; ISR 14 (Page Fault) requires error code pushed by CPU
isr14:
    cli
    push 14            ; Push interrupt number
    jmp isr_common_handler

; ISRs 15 to 31 (no error code pushed by CPU)
isr15:
    cli
    push 0
    push 15
    jmp isr_common_handler

isr16:
    cli
    push 0
    push 16
    jmp isr_common_handler

isr17:
    cli
    push 0
    push 17
    jmp isr_common_handler

isr18:
    cli
    push 0
    push 18
    jmp isr_common_handler

isr19:
    cli
    push 0
    push 19
    jmp isr_common_handler

isr20:
    cli
    push 0
    push 20
    jmp isr_common_handler




