split out rst vectors

This commit is contained in:
yenatch 2013-09-03 18:17:33 -04:00
parent 0caac30f27
commit dad64b1d9d
2 changed files with 39 additions and 39 deletions

View File

@ -1,44 +1,6 @@
SECTION "bank0",ROM0 SECTION "bank0",ROM0
INCLUDE "rst.asm"
; rst vectors
SECTION "rst0",ROM0[0]
di
jp Start
SECTION "rst8",ROM0[FarCall]
jp FarCall_hl
SECTION "rst10",ROM0[Bankswitch]
ld [hROMBank], a
ld [MBC3RomBank], a
ret
SECTION "rst18",ROM0[$18]
rst $38
SECTION "rst20",ROM0[$20]
rst $38
SECTION "rst28",ROM0[JumpTable]
push de
ld e, a
ld d, 0
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
pop de
jp [hl]
; SECTION "rst30",ROM0[$30]
; rst30 is midst rst28
SECTION "rst38",ROM0[$38]
rst $38
INCLUDE "interrupts.asm" INCLUDE "interrupts.asm"

38
rst.asm Normal file
View File

@ -0,0 +1,38 @@
; rst vectors
SECTION "rst0",ROM0[0]
di
jp Start
SECTION "rst8",ROM0[FarCall]
jp FarCall_hl
SECTION "rst10",ROM0[Bankswitch]
ld [hROMBank], a
ld [MBC3RomBank], a
ret
SECTION "rst18",ROM0[$18]
rst $38
SECTION "rst20",ROM0[$20]
rst $38
SECTION "rst28",ROM0[JumpTable]
push de
ld e, a
ld d, 0
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
pop de
jp [hl]
; SECTION "rst30",ROM0[$30]
; rst30 is midst rst28
SECTION "rst38",ROM0[$38]
rst $38