From bc6f3e6f8007b3ce7555d96a71fcab6d9a3e836d Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Sat, 3 Apr 2021 18:37:09 +0100 Subject: [PATCH] add copious amount of comments --- interrupt_simple.s | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/interrupt_simple.s b/interrupt_simple.s index 61df2f3a..0d91381f 100644 --- a/interrupt_simple.s +++ b/interrupt_simple.s @@ -3,15 +3,15 @@ .global InterruptHandlerSimple .align InterruptHandlerSimple: - ldr r2, =0x04000200 - ldrh r1, [r2] - ldrh r3, [r2, #2] - and r0, r1, r3 - strh r0, [r2, #2] + ldr r2, =0x04000200 @ interrupt enable register location + ldrh r1, [r2] @ load 16 bit interrupt enable to r1 + ldrh r3, [r2, #2] @ load 16 bit interrupt request to r3 + and r0, r1, r3 @ interrupts both enabled and requested + strh r0, [r2, #2] @ store to interrupt request - ldr r2, =0x03007FF8 - ldrh r1, [r2] - orr r1, r1, r0 - strh r1, [r2] + ldr r2, =0x03007FF8 @ load bios interrupt request location + ldrh r1, [r2] @ load bios interrupt requests + orr r1, r1, r0 @ or with enabled and requested interrupts + strh r1, [r2] @ acknowlege bios requests - bx lr + bx lr @ return to bios