Main /
Interrupts

Menu

Getting Started

System Information

Misc

Todo: talk about what interrupts are, how to use them, etc...

ARM7 Interrupt handler:

 
stmdb	sp!, {r0-r3, r12, lr}
mov	r0, #0x04000000
add	lr, pc, #0x0
ldr	pc, [r0, #-0x4]
ldmia	sp!, {r0-r3, r12, lr}
subs	pc, lr, #0x4

The user ARM7 interrupt vector is thus 0x03FFFFFC (mirrors down into ARM7 work RAM)

ARM9 Interrupt handler:

 
stmdb	sp!, {r0-r3, r12, lr}
mrc	p15, 0, r0, c9, c1	@ r0 = DTCM_BaseAddress + 0x4000
mov	r0, r0, lsr #12
mov	r0, r0, lsl #12
add	r0, r0, #0x4000
add	lr, pc, #0x0
ldr	pc, [r0, #-0x4]		@ bl [DTCM_BaseAddress + 0x3FFC]
ldmia	sp!, {r0-r3, r12, lr}
subs	pc, lr, #0x4

The user ARM9 interrupt vector is thus at DTCM+0x3FFC

In both cases, the BIOS flag word used in swi 0x4 and 0x5 is 4 bytes before the interrupt vector.

Recent Changes (All) | Edit SideBar

Page last modified on February 02, 2005, at 02:51 PM
Edit Page | Page History
Everything done on this project is for the sole purpose of writing interoperable software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
This site is not affiliated with Nintendo in any manner. Nintendo DS © 2004 Nintendo. TM and ® are trademarks of Nintendo.
Powered by PmWiki