FreeCalypso > hg > ffs-editor
comparison src/cs/system/main/gcc/int_dummy.S @ 0:92470e5d0b9e
src: partial import from FC Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 May 2020 01:28:16 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92470e5d0b9e |
---|---|
1 /* | |
2 * This assembly module contains a few dummy INT_*() functions | |
3 * which are needed by Nucleus (tcc.c) but aren't used in TI's | |
4 * environment. This code used to be in the big messy int.s | |
5 * assembly module in the original version. | |
6 */ | |
7 | |
8 .text | |
9 .code 32 | |
10 | |
11 /*************************************************************************/ | |
12 /* */ | |
13 /* FUNCTION */ | |
14 /* */ | |
15 /* INT_Vectors_Loaded */ | |
16 /* */ | |
17 /* DESCRIPTION */ | |
18 /* */ | |
19 /* This function returns the flag that indicates whether or not */ | |
20 /* all the default vectors have been loaded. If it is false, */ | |
21 /* each LISR register also loads the ISR shell into the actual */ | |
22 /* vector table. */ | |
23 /* */ | |
24 /* AUTHOR */ | |
25 /* */ | |
26 /* Barry Sellew, Accelerated Technology, Inc. */ | |
27 /* */ | |
28 /* CALLED BY */ | |
29 /* */ | |
30 /* TCC_Register_LISR Register LISR for vector */ | |
31 /* */ | |
32 /* CALLS */ | |
33 /* */ | |
34 /* None */ | |
35 /* */ | |
36 /* INPUTS */ | |
37 /* */ | |
38 /* None */ | |
39 /* */ | |
40 /* OUTPUTS */ | |
41 /* */ | |
42 /* None */ | |
43 /* */ | |
44 /* HISTORY */ | |
45 /* */ | |
46 /* NAME DATE REMARKS */ | |
47 /* */ | |
48 /* B. Sellew 01-19-1996 Created initial version 1.0 */ | |
49 /* B. Sellew 01-22-1996 Verified version 1.0 */ | |
50 /* */ | |
51 /*************************************************************************/ | |
52 | |
53 @INT INT_Vectors_Loaded(void) | |
54 @{ | |
55 .globl INT_Vectors_Loaded | |
56 INT_Vectors_Loaded: | |
57 @ | |
58 @ /* Just return the loaded vectors flag. */ | |
59 @ return(INT_Loaded_Flag); | |
60 @ | |
61 MOV a1,#1 @ Always return TRUE since there | |
62 @ are really only two normal | |
63 @ vectors IRQ & FIQ | |
64 BX lr @ Return to caller | |
65 @} | |
66 | |
67 | |
68 /*************************************************************************/ | |
69 /* */ | |
70 /* FUNCTION */ | |
71 /* */ | |
72 /* INT_Setup_Vector */ | |
73 /* */ | |
74 /* DESCRIPTION */ | |
75 /* */ | |
76 /* This function sets up the specified vector with the new vector */ | |
77 /* value. The previous vector value is returned to the caller. */ | |
78 /* */ | |
79 /* AUTHOR */ | |
80 /* */ | |
81 /* Barry Sellew, Accelerated Technology, Inc. */ | |
82 /* */ | |
83 /* CALLED BY */ | |
84 /* */ | |
85 /* Application */ | |
86 /* TCC_Register_LISR Register LISR for vector */ | |
87 /* */ | |
88 /* CALLS */ | |
89 /* */ | |
90 /* None */ | |
91 /* */ | |
92 /* INPUTS */ | |
93 /* */ | |
94 /* vector Vector number to setup */ | |
95 /* new Pointer to new assembly */ | |
96 /* language ISR */ | |
97 /* */ | |
98 /* OUTPUTS */ | |
99 /* */ | |
100 /* old vector contents */ | |
101 /* */ | |
102 /* HISTORY */ | |
103 /* */ | |
104 /* NAME DATE REMARKS */ | |
105 /* */ | |
106 /* B. Sellew 01-19-1996 Created initial version 1.0 */ | |
107 /* B. Sellew 01-22-1996 Verified version 1.0 */ | |
108 /* */ | |
109 /*************************************************************************/ | |
110 | |
111 @VOID *INT_Setup_Vector(INT vector, VOID *new) | |
112 @{ | |
113 .globl INT_Setup_Vector | |
114 INT_Setup_Vector: | |
115 @ | |
116 @VOID *old_vector; /* Old interrupt vector */ | |
117 @VOID **vector_table; /* Pointer to vector table */ | |
118 @ | |
119 @ /* Calculate the starting address of the actual vector table. */ | |
120 @ vector_table = (VOID **) 0; | |
121 @ | |
122 @ /* Pickup the old interrupt vector. */ | |
123 @ old_vector = vector_table[vector]; | |
124 @ | |
125 @ /* Setup the new interrupt vector. */ | |
126 @ vector_table[vector] = new; | |
127 @ | |
128 @ /* Return the old interrupt vector. */ | |
129 @ return(old_vector); | |
130 @ | |
131 MOV a1,#0 @ This routine is not applicable to | |
132 @ THUMB, return a NULL pointer | |
133 BX lr @ Return to caller | |
134 @} | |
135 | |
136 | |
137 /*************************************************************************/ | |
138 /* */ | |
139 /* FUNCTION */ | |
140 /* */ | |
141 /* INT_Retrieve_Shell */ | |
142 /* */ | |
143 /* DESCRIPTION */ | |
144 /* */ | |
145 /* This function retrieves the pointer to the shell interrupt */ | |
146 /* service routine. The shell interrupt service routine calls */ | |
147 /* the LISR dispatch routine. */ | |
148 /* */ | |
149 /* AUTHOR */ | |
150 /* */ | |
151 /* Barry Sellew, Accelerated Technology, Inc. */ | |
152 /* */ | |
153 /* CALLED BY */ | |
154 /* */ | |
155 /* TCC_Register_LISR Register LISR for vector */ | |
156 /* */ | |
157 /* CALLS */ | |
158 /* */ | |
159 /* None */ | |
160 /* */ | |
161 /* INPUTS */ | |
162 /* */ | |
163 /* vector Vector number to setup */ | |
164 /* */ | |
165 /* OUTPUTS */ | |
166 /* */ | |
167 /* shell pointer */ | |
168 /* */ | |
169 /* HISTORY */ | |
170 /* */ | |
171 /* NAME DATE REMARKS */ | |
172 /* */ | |
173 /* B. Sellew 01-19-1996 Created initial version 1.0 */ | |
174 /* B. Sellew 01-22-1996 Verified version 1.0 */ | |
175 /* */ | |
176 /*************************************************************************/ | |
177 | |
178 @VOID *INT_Retrieve_Shell(INT vector) | |
179 @{ | |
180 .globl INT_Retrieve_Shell | |
181 INT_Retrieve_Shell: | |
182 @ | |
183 @ /* Return the LISR Shell interrupt routine. */ | |
184 @ return(INT_Vectors[vector]); | |
185 @ | |
186 MOV a1,#0 @ This routine is not applicable to | |
187 @ THUMB, return a NULL pointer | |
188 BX lr @ Return to caller | |
189 @} |