diff --git a/interrupts.asm b/interrupts.asm new file mode 100644 index 000000000..2da426e96 --- /dev/null +++ b/interrupts.asm @@ -0,0 +1,17 @@ +; Game Boy hardware interrupts + +SECTION "vblank",ROM0[$40] + jp VBlank + +SECTION "lcd",ROM0[$48] + jp LCD + +SECTION "timer",ROM0[$50] + jp Timer + +SECTION "serial",ROM0[$58] + jp Serial + +SECTION "joypad",ROM0[$60] + jp JoypadInt + diff --git a/main.asm b/main.asm index 636bbbce8..cbc0de47b 100644 --- a/main.asm +++ b/main.asm @@ -34,22 +34,7 @@ SECTION "rst28",ROM0[$28] ; JumpTable SECTION "rst38",ROM0[$38] ; Unused rst $38 -; Game Boy hardware interrupts - -SECTION "vblank",ROM0[$40] - jp VBlank - -SECTION "lcd",ROM0[$48] - jp LCD - -SECTION "timer",ROM0[$50] - jp Timer - -SECTION "serial",ROM0[$58] - jp Serial - -SECTION "joypad",ROM0[$60] - jp JoypadInt +INCLUDE "interrupts.asm" SECTION "header",ROM0[$100]