Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC23XX/device/TOOLCHAIN_GCC_CS/vector_functions.S@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | # 1 "vector_functions.s" |
sahilmgandhi | 18:6a4db94011d3 | 2 | # 1 "<built-in>" |
sahilmgandhi | 18:6a4db94011d3 | 3 | # 1 "<command line>" |
sahilmgandhi | 18:6a4db94011d3 | 4 | # 1 "vector_functions.s" |
sahilmgandhi | 18:6a4db94011d3 | 5 | ; |
sahilmgandhi | 18:6a4db94011d3 | 6 | ; |
sahilmgandhi | 18:6a4db94011d3 | 7 | ; |
sahilmgandhi | 18:6a4db94011d3 | 8 | |
sahilmgandhi | 18:6a4db94011d3 | 9 | # 1 "vector_defns.h" 1 |
sahilmgandhi | 18:6a4db94011d3 | 10 | # 6 "vector_functions.s" 2 |
sahilmgandhi | 18:6a4db94011d3 | 11 | |
sahilmgandhi | 18:6a4db94011d3 | 12 | |
sahilmgandhi | 18:6a4db94011d3 | 13 | |
sahilmgandhi | 18:6a4db94011d3 | 14 | |
sahilmgandhi | 18:6a4db94011d3 | 15 | |
sahilmgandhi | 18:6a4db94011d3 | 16 | |
sahilmgandhi | 18:6a4db94011d3 | 17 | .section VECFUNCS, "ax" |
sahilmgandhi | 18:6a4db94011d3 | 18 | .arm |
sahilmgandhi | 18:6a4db94011d3 | 19 | |
sahilmgandhi | 18:6a4db94011d3 | 20 | |
sahilmgandhi | 18:6a4db94011d3 | 21 | .weak __mbed_fiq |
sahilmgandhi | 18:6a4db94011d3 | 22 | .weak __mbed_undef |
sahilmgandhi | 18:6a4db94011d3 | 23 | .weak __mbed_prefetch_abort |
sahilmgandhi | 18:6a4db94011d3 | 24 | .weak __mbed_data_abort |
sahilmgandhi | 18:6a4db94011d3 | 25 | .weak __mbed_irq |
sahilmgandhi | 18:6a4db94011d3 | 26 | .weak __mbed_swi |
sahilmgandhi | 18:6a4db94011d3 | 27 | .weak __mbed_dcc_irq |
sahilmgandhi | 18:6a4db94011d3 | 28 | .weak __mbed_reset |
sahilmgandhi | 18:6a4db94011d3 | 29 | .global __mbed_init_realmonitor |
sahilmgandhi | 18:6a4db94011d3 | 30 | .global __mbed_init |
sahilmgandhi | 18:6a4db94011d3 | 31 | |
sahilmgandhi | 18:6a4db94011d3 | 32 | ; |
sahilmgandhi | 18:6a4db94011d3 | 33 | ; |
sahilmgandhi | 18:6a4db94011d3 | 34 | __mbed_fiq: |
sahilmgandhi | 18:6a4db94011d3 | 35 | B __mbed_fiq |
sahilmgandhi | 18:6a4db94011d3 | 36 | |
sahilmgandhi | 18:6a4db94011d3 | 37 | ; |
sahilmgandhi | 18:6a4db94011d3 | 38 | ; |
sahilmgandhi | 18:6a4db94011d3 | 39 | __mbed_undef: |
sahilmgandhi | 18:6a4db94011d3 | 40 | LDR PC, =0x7fffffa0 |
sahilmgandhi | 18:6a4db94011d3 | 41 | |
sahilmgandhi | 18:6a4db94011d3 | 42 | ; |
sahilmgandhi | 18:6a4db94011d3 | 43 | ; |
sahilmgandhi | 18:6a4db94011d3 | 44 | __mbed_prefetch_abort: |
sahilmgandhi | 18:6a4db94011d3 | 45 | LDR PC, =0x7fffffb0 |
sahilmgandhi | 18:6a4db94011d3 | 46 | |
sahilmgandhi | 18:6a4db94011d3 | 47 | ; |
sahilmgandhi | 18:6a4db94011d3 | 48 | ; |
sahilmgandhi | 18:6a4db94011d3 | 49 | __mbed_data_abort: |
sahilmgandhi | 18:6a4db94011d3 | 50 | LDR PC, =0x7fffffc0 |
sahilmgandhi | 18:6a4db94011d3 | 51 | |
sahilmgandhi | 18:6a4db94011d3 | 52 | ; |
sahilmgandhi | 18:6a4db94011d3 | 53 | ; |
sahilmgandhi | 18:6a4db94011d3 | 54 | ; |
sahilmgandhi | 18:6a4db94011d3 | 55 | ; |
sahilmgandhi | 18:6a4db94011d3 | 56 | ; |
sahilmgandhi | 18:6a4db94011d3 | 57 | ; |
sahilmgandhi | 18:6a4db94011d3 | 58 | ; |
sahilmgandhi | 18:6a4db94011d3 | 59 | ; |
sahilmgandhi | 18:6a4db94011d3 | 60 | ; |
sahilmgandhi | 18:6a4db94011d3 | 61 | __mbed_irq: |
sahilmgandhi | 18:6a4db94011d3 | 62 | ; |
sahilmgandhi | 18:6a4db94011d3 | 63 | MSR CPSR_c, #0x1F|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 64 | |
sahilmgandhi | 18:6a4db94011d3 | 65 | ; |
sahilmgandhi | 18:6a4db94011d3 | 66 | STMDB sp!, {r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 67 | |
sahilmgandhi | 18:6a4db94011d3 | 68 | ; |
sahilmgandhi | 18:6a4db94011d3 | 69 | MOV r0, #0xFFFFFF00 |
sahilmgandhi | 18:6a4db94011d3 | 70 | LDR r0, [r0] |
sahilmgandhi | 18:6a4db94011d3 | 71 | |
sahilmgandhi | 18:6a4db94011d3 | 72 | ; |
sahilmgandhi | 18:6a4db94011d3 | 73 | MOV lr, pc |
sahilmgandhi | 18:6a4db94011d3 | 74 | BX r0 |
sahilmgandhi | 18:6a4db94011d3 | 75 | |
sahilmgandhi | 18:6a4db94011d3 | 76 | ; |
sahilmgandhi | 18:6a4db94011d3 | 77 | MOV r0, #0xFFFFFF00 |
sahilmgandhi | 18:6a4db94011d3 | 78 | STR r0, [r0] ; |
sahilmgandhi | 18:6a4db94011d3 | 79 | |
sahilmgandhi | 18:6a4db94011d3 | 80 | ; |
sahilmgandhi | 18:6a4db94011d3 | 81 | LDMFD sp!,{r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 82 | |
sahilmgandhi | 18:6a4db94011d3 | 83 | ; |
sahilmgandhi | 18:6a4db94011d3 | 84 | MSR CPSR_c, #0x12|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 85 | |
sahilmgandhi | 18:6a4db94011d3 | 86 | ; |
sahilmgandhi | 18:6a4db94011d3 | 87 | SUBS pc, lr, #4 |
sahilmgandhi | 18:6a4db94011d3 | 88 | |
sahilmgandhi | 18:6a4db94011d3 | 89 | ; |
sahilmgandhi | 18:6a4db94011d3 | 90 | ; |
sahilmgandhi | 18:6a4db94011d3 | 91 | ; |
sahilmgandhi | 18:6a4db94011d3 | 92 | ; |
sahilmgandhi | 18:6a4db94011d3 | 93 | __mbed_swi: |
sahilmgandhi | 18:6a4db94011d3 | 94 | ; |
sahilmgandhi | 18:6a4db94011d3 | 95 | ; |
sahilmgandhi | 18:6a4db94011d3 | 96 | STMFD sp!, {a4, r4, ip, lr} |
sahilmgandhi | 18:6a4db94011d3 | 97 | |
sahilmgandhi | 18:6a4db94011d3 | 98 | ; |
sahilmgandhi | 18:6a4db94011d3 | 99 | LDR r4, =0x40000040 |
sahilmgandhi | 18:6a4db94011d3 | 100 | |
sahilmgandhi | 18:6a4db94011d3 | 101 | ; |
sahilmgandhi | 18:6a4db94011d3 | 102 | ; |
sahilmgandhi | 18:6a4db94011d3 | 103 | LDR a4, =0x00940000 |
sahilmgandhi | 18:6a4db94011d3 | 104 | LDR PC, =0x7ffff820 |
sahilmgandhi | 18:6a4db94011d3 | 105 | |
sahilmgandhi | 18:6a4db94011d3 | 106 | ; |
sahilmgandhi | 18:6a4db94011d3 | 107 | ; |
sahilmgandhi | 18:6a4db94011d3 | 108 | ; |
sahilmgandhi | 18:6a4db94011d3 | 109 | ; |
sahilmgandhi | 18:6a4db94011d3 | 110 | __mbed_dcc_irq: |
sahilmgandhi | 18:6a4db94011d3 | 111 | |
sahilmgandhi | 18:6a4db94011d3 | 112 | ; |
sahilmgandhi | 18:6a4db94011d3 | 113 | |
sahilmgandhi | 18:6a4db94011d3 | 114 | ; |
sahilmgandhi | 18:6a4db94011d3 | 115 | LDMFD sp!,{r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 116 | |
sahilmgandhi | 18:6a4db94011d3 | 117 | ; |
sahilmgandhi | 18:6a4db94011d3 | 118 | MSR CPSR_c, #0x12|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 119 | |
sahilmgandhi | 18:6a4db94011d3 | 120 | ; |
sahilmgandhi | 18:6a4db94011d3 | 121 | |
sahilmgandhi | 18:6a4db94011d3 | 122 | ; |
sahilmgandhi | 18:6a4db94011d3 | 123 | SUB lr, lr, #4 ; |
sahilmgandhi | 18:6a4db94011d3 | 124 | STMFD sp!, {ip,lr} ; |
sahilmgandhi | 18:6a4db94011d3 | 125 | |
sahilmgandhi | 18:6a4db94011d3 | 126 | ; |
sahilmgandhi | 18:6a4db94011d3 | 127 | LDR LR, =0xfffff000 |
sahilmgandhi | 18:6a4db94011d3 | 128 | STR LR, [LR, #0xf00] |
sahilmgandhi | 18:6a4db94011d3 | 129 | |
sahilmgandhi | 18:6a4db94011d3 | 130 | ; |
sahilmgandhi | 18:6a4db94011d3 | 131 | ; |
sahilmgandhi | 18:6a4db94011d3 | 132 | ; |
sahilmgandhi | 18:6a4db94011d3 | 133 | ; |
sahilmgandhi | 18:6a4db94011d3 | 134 | LDR PC, =0x7fffffe0 |
sahilmgandhi | 18:6a4db94011d3 | 135 | |
sahilmgandhi | 18:6a4db94011d3 | 136 | ; |
sahilmgandhi | 18:6a4db94011d3 | 137 | ; |
sahilmgandhi | 18:6a4db94011d3 | 138 | __mbed_reset: |
sahilmgandhi | 18:6a4db94011d3 | 139 | |
sahilmgandhi | 18:6a4db94011d3 | 140 | ; |
sahilmgandhi | 18:6a4db94011d3 | 141 | |
sahilmgandhi | 18:6a4db94011d3 | 142 | LDR R0, =(0x40000000 + 0x8000) |
sahilmgandhi | 18:6a4db94011d3 | 143 | |
sahilmgandhi | 18:6a4db94011d3 | 144 | ; |
sahilmgandhi | 18:6a4db94011d3 | 145 | MSR CPSR_c, #0x1B|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 146 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 147 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 148 | |
sahilmgandhi | 18:6a4db94011d3 | 149 | ; |
sahilmgandhi | 18:6a4db94011d3 | 150 | MSR CPSR_c, #0x17|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 151 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 152 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 153 | |
sahilmgandhi | 18:6a4db94011d3 | 154 | ; |
sahilmgandhi | 18:6a4db94011d3 | 155 | MSR CPSR_c, #0x11|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 156 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 157 | SUB R0, R0, #0x00000000 |
sahilmgandhi | 18:6a4db94011d3 | 158 | |
sahilmgandhi | 18:6a4db94011d3 | 159 | ; |
sahilmgandhi | 18:6a4db94011d3 | 160 | MSR CPSR_c, #0x12|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 161 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 162 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 163 | |
sahilmgandhi | 18:6a4db94011d3 | 164 | ; |
sahilmgandhi | 18:6a4db94011d3 | 165 | MSR CPSR_c, #0x13|0x80|0x40 |
sahilmgandhi | 18:6a4db94011d3 | 166 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 167 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 168 | |
sahilmgandhi | 18:6a4db94011d3 | 169 | ; |
sahilmgandhi | 18:6a4db94011d3 | 170 | MSR CPSR_c, #0x10 |
sahilmgandhi | 18:6a4db94011d3 | 171 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 172 | |
sahilmgandhi | 18:6a4db94011d3 | 173 | ; |
sahilmgandhi | 18:6a4db94011d3 | 174 | LDR R0, =__mbed_init_realmonitor |
sahilmgandhi | 18:6a4db94011d3 | 175 | MOV LR, PC |
sahilmgandhi | 18:6a4db94011d3 | 176 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 177 | |
sahilmgandhi | 18:6a4db94011d3 | 178 | ; |
sahilmgandhi | 18:6a4db94011d3 | 179 | LDR R0, =__mbed_init |
sahilmgandhi | 18:6a4db94011d3 | 180 | BX R0 |