aboutsummaryrefslogtreecommitdiffstats
path: root/lab1/RTDSP/vectors.asm
diff options
context:
space:
mode:
authorymherklotz <ymherklotz@gmail.com>2018-01-16 12:16:38 +0000
committerymherklotz <ymherklotz@gmail.com>2018-01-16 12:16:38 +0000
commit0ba4e6e322addb8ed678d0b3d6fb81328a6f33be (patch)
treea2441830e10593a2b6fd6adf933a18d1b5e98be3 /lab1/RTDSP/vectors.asm
downloadNoiseSilencer-0ba4e6e322addb8ed678d0b3d6fb81328a6f33be.tar.gz
NoiseSilencer-0ba4e6e322addb8ed678d0b3d6fb81328a6f33be.zip
Reorganising and adding lab2
Diffstat (limited to 'lab1/RTDSP/vectors.asm')
-rw-r--r--lab1/RTDSP/vectors.asm60
1 files changed, 60 insertions, 0 deletions
diff --git a/lab1/RTDSP/vectors.asm b/lab1/RTDSP/vectors.asm
new file mode 100644
index 0000000..1536762
--- /dev/null
+++ b/lab1/RTDSP/vectors.asm
@@ -0,0 +1,60 @@
+;
+; ======== vectors.asm ========
+; Plug in the entry point at RESET in the interrupt vector table
+;
+
+;
+; ======== unused ========
+; plug inifinite loop -- with nested branches to
+; disable interrupts -- for all undefined vectors
+;
+unused .macro id
+
+ .global unused:id:
+unused:id:
+ b unused:id: ; nested branches to block interrupts
+ nop 4
+ b unused:id:
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ .endm
+
+ .sect ".vectors"
+
+ .ref _c_int00 ; C entry point
+
+ .align 32*8*4 ; must be aligned on 256 word boundary
+
+RESET: ; reset vector
+ mvkl _c_int00,b0 ; load destination function address to b0
+ mvkh _c_int00,b0
+ b b0 ; start branch to destination function
+ mvc PCE1,b0 ; address of interrupt vectors
+ mvc b0,ISTP ; set table to point here
+ nop 3 ; fill delay slot
+ nop
+ nop
+
+ ;
+ ; plug unused interrupts with infinite loops to
+ ; catch stray interrupts
+ ;
+ unused 1
+ unused 2
+ unused 3
+ unused 4
+ unused 5
+ unused 6
+ unused 7
+ unused 8
+ unused 9
+ unused 10
+ unused 11
+ unused 12
+ unused 13
+ unused 14
+ unused 15