megadrive_test1

annotate src/intr.s @ 3:54739a11be66

- .data copy and .bss clearing - also made sure .data and .bss start and end markers are dword-aligned to make sure I can copy 4bytes at a time
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 31 Jan 2017 07:11:17 +0200
parents
children
rev   line source
nuclear@0 1 | the following will go into the .vect section which will be placed at the very
nuclear@0 2 | begining of the binary at address 0 by the linker (see lnkscript).
nuclear@0 3 .section .vect,"a"
nuclear@0 4 .extern start
nuclear@0 5 | exception vectors
nuclear@0 6 .long _stacktop | 00 reset - initial SSP
nuclear@0 7 .long start | 01 reset - initial PC
nuclear@0 8 .long intr_fatal | 02 bus error
nuclear@0 9 .long intr_fatal | 03 address error
nuclear@0 10 .long intr_fatal | 04 illegal instruction
nuclear@0 11 .long intr_fatal | 05 zero divide
nuclear@0 12 .long intr_fatal | 06 chk instruction
nuclear@0 13 .long intr_fatal | 07 trapv instruction
nuclear@0 14 .long intr_fatal | 08 privilege violation
nuclear@0 15 .long intr_fatal | 09 trace
nuclear@0 16 .long intr_fatal | 0a line 1010 emulator
nuclear@0 17 .long intr_fatal | 0b line 1111 emulator
nuclear@0 18 .long intr_fatal | 0c reserved
nuclear@0 19 .long intr_fatal | 0d reserved
nuclear@0 20 .long intr_fatal | 0e format error (mc68010 only)
nuclear@0 21 .long intr_fatal | 0f uninitialized interrupt vector
nuclear@0 22 .long intr_fatal | 10 \
nuclear@0 23 .long intr_fatal | 11 |
nuclear@0 24 .long intr_fatal | 12 |
nuclear@0 25 .long intr_fatal | 13 > reserved
nuclear@0 26 .long intr_fatal | 14 |
nuclear@0 27 .long intr_fatal | 15 |
nuclear@0 28 .long intr_fatal | 16 |
nuclear@0 29 .long intr_fatal | 17 /
nuclear@0 30 .long intr_fatal | 18 spurious interrupt
nuclear@0 31 .long intr_fatal | 19 level 1 interrupt
nuclear@0 32 .long intr_fatal | 1a level 2 interrupt
nuclear@0 33 .long intr_fatal | 1b level 3 interrupt
nuclear@0 34 .long intr_hblank | 1c level 4 interrupt (hblank in the mega drive)
nuclear@0 35 .long intr_fatal | 1d level 5 interrupt
nuclear@0 36 .long intr_vblank | 1e level 6 interrupt (vblank in the mega drive)
nuclear@0 37 .long intr_fatal | 1f level 7 interrupt
nuclear@0 38 .long intr_fatal | 20 trap 0
nuclear@0 39 .long intr_fatal | 21 trap 1
nuclear@0 40 .long intr_fatal | 22 trap 2
nuclear@0 41 .long intr_fatal | 23 trap 3
nuclear@0 42 .long intr_fatal | 24 trap 4
nuclear@0 43 .long intr_fatal | 25 trap 5
nuclear@0 44 .long intr_fatal | 26 trap 6
nuclear@0 45 .long intr_fatal | 27 trap 7
nuclear@0 46 .long intr_fatal | 28 trap 8
nuclear@0 47 .long intr_fatal | 29 trap 9
nuclear@0 48 .long intr_fatal | 2a trap a
nuclear@0 49 .long intr_fatal | 2b trap b
nuclear@0 50 .long intr_fatal | 2c trap c
nuclear@0 51 .long intr_fatal | 2d trap d
nuclear@0 52 .long intr_fatal | 2e trap e
nuclear@0 53 .long intr_fatal | 2f trap f
nuclear@0 54 .long intr_fatal | 30 \
nuclear@0 55 .long intr_fatal | 31 |
nuclear@0 56 .long intr_fatal | 32 |
nuclear@0 57 .long intr_fatal | 33 |
nuclear@0 58 .long intr_fatal | 34 |
nuclear@0 59 .long intr_fatal | 35 |
nuclear@0 60 .long intr_fatal | 36 |
nuclear@0 61 .long intr_fatal | 37 |
nuclear@0 62 .long intr_fatal | 38 > reserved
nuclear@0 63 .long intr_fatal | 39 |
nuclear@0 64 .long intr_fatal | 3a |
nuclear@0 65 .long intr_fatal | 3b |
nuclear@0 66 .long intr_fatal | 3c |
nuclear@0 67 .long intr_fatal | 3d |
nuclear@0 68 .long intr_fatal | 3e |
nuclear@0 69 .long intr_fatal | 3f /
nuclear@0 70
nuclear@0 71 | from here on we continue in the regular .text section since we don't care
nuclear@0 72 | where this code ends up.
nuclear@0 73 .text
nuclear@0 74 | interrupt handlers
nuclear@0 75 intr_fatal:
nuclear@0 76 stop #0x2700
nuclear@0 77
nuclear@0 78 | TODO hblank/vblank code
nuclear@0 79 intr_hblank:
nuclear@0 80 rte
nuclear@0 81 intr_vblank:
nuclear@0 82 rte