File: nasm

package info (click to toggle)
ruby-rouge 4.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,844 kB
  • sloc: ruby: 38,489; sed: 2,071; perl: 152; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%macro IRQ 2
    global irq%1
    irq%1:
        cli
        push byte 0     ; push a dummy error code
        push byte %2    ; push the IRQ number
        jmp  irq_common_stub
%endmacro

extern irq_handler

irq_common_stub:
    pusha             ; push all general-purpose registers
    mov   ax, ds      ; lower 16-bits of eax = ds
    push  eax         ; save the data segment descriptor
    mov   ax, 0x10    ; load the kernel data segment descriptor
    mov   edx, eax
    call  irq_handler

%assign i 0
%rep 8
ISR_NOERRCODE i
%assign i i+1
%endrep

ISR_NOERRCODE 9