]> begriffs open source - cmsis-freertos/blob - Demo/NEC_V850ES_IAR/RegTest.s85
Update cmsis_os2.c
[cmsis-freertos] / Demo / NEC_V850ES_IAR / RegTest.s85
1 ;/*
2 ;    FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
3 ;       
4 ;
5 ;    ***************************************************************************
6 ;     *                                                                       *
7 ;     *    FreeRTOS tutorial books are available in pdf and paperback.        *
8 ;     *    Complete, revised, and edited pdf reference manuals are also       *
9 ;     *    available.                                                         *
10 ;     *                                                                       *
11 ;     *    Purchasing FreeRTOS documentation will not only help you, by       *
12 ;     *    ensuring you get running as quickly as possible and with an        *
13 ;     *    in-depth knowledge of how to use FreeRTOS, it will also help       *
14 ;     *    the FreeRTOS project to continue with its mission of providing     *
15 ;     *    professional grade, cross platform, de facto standard solutions    *
16 ;     *    for microcontrollers - completely free of charge!                  *
17 ;     *                                                                       *
18 ;     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *
19 ;     *                                                                       *
20 ;     *    Thank you for using FreeRTOS, and thank you for your support!      *
21 ;     *                                                                       *
22 ;    ***************************************************************************
23 ;
24 ;
25 ;    This file is part of the FreeRTOS distribution.
26 ;
27 ;    FreeRTOS is free software; you can redistribute it and/or modify it under
28 ;    the terms of the GNU General Public License (version 2) as published by the
29 ;    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30 ;    >>>NOTE<<< The modification to the GPL is included to allow you to
31 ;    distribute a combined work that includes FreeRTOS without being obliged to
32 ;    provide the source code for proprietary components outside of the FreeRTOS
33 ;    kernel.  FreeRTOS is distributed in the hope that it will be useful, but
34 ;    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
35 ;    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
36 ;    more details. You should have received a copy of the GNU General Public
37 ;    License and the FreeRTOS license exception along with FreeRTOS; if not it
38 ;    can be viewed here: http://www.freertos.org/a00114.html and also obtained
39 ;    by writing to Richard Barry, contact details for whom are available on the
40 ;    FreeRTOS WEB site.
41 ;
42 ;    1 tab == 4 spaces!
43 ;
44 ;    http://www.FreeRTOS.org - Documentation, latest information, license and
45 ;    contact details.
46 ;
47 ;    http://www.SafeRTOS.com - A version that is certified for use in safety
48 ;    critical systems.
49 ;
50 ;    http://www.OpenRTOS.com - Commercial support, development, porting,
51 ;    licensing and training services.
52 ;*/
53 ; Note: Select the correct include files for the device used by the application.
54
55         EXTERN  vRegTestFailed
56
57
58
59 ;
60 ; The RegTest tasks as described in the comments at the top of main().
61 ;
62
63
64 ;------------------------------------------------------------------------------
65
66 ; Functions implemented in this file
67 ;------------------------------------------------------------------------------
68     PUBLIC      vRegTest1
69     PUBLIC      vRegTest2
70
71
72 ;------------------------------------------------------------------------------
73 ;------------------------------------------------------------------------------ 
74     RSEG CODE:CODE
75 vRegTest1:
76     MOV         0x01010101, R1
77     MOV         0x02020202, R2
78         ; Ignore R3 and R4 as these are the stack and global pointers respectively.
79         MOV             0x04040404, R5
80         MOV             0x05050505, R6
81         MOV             0x06060606, R7
82         MOV             0x07070707, R8
83         MOV             0x08080808, R9
84         MOV             0x09090909, R10
85         MOV             0x0a0a0a0a, R11
86         MOV             0x0b0b0b0b, R12
87         MOV             0x0c0c0c0c, R13
88         MOV             0x0d0d0d0d, R14
89         MOV             0x0e0e0e0e, R15
90         MOV             0x0f0f0f0f, R16
91         MOV             0x10101010, R17
92         MOV             0x11111111, R18
93         MOV             0x12121212, R19
94         MOV             0x13131313, R20
95         MOV             0x14141414, R21
96         MOV             0x15151515, R22
97         MOV             0x16161616, R23
98         MOV             0x17171717, R24
99 #if ( configDATA_MODE == 1 )
100         ;R25 is used as a base register except when the tiny model is used. */
101         MOV             0x18181818, R25
102 #endif
103         MOV             0x19191919, R26
104         MOV             0x20202020, R27
105         MOV             0x21212121, R28
106         MOV             0x22222222, R29
107         MOV             0x23232323, R30
108         
109 vReg1TestLoopStart:
110         TRAP    0
111         MOV             0x01010101, R31
112         CMP             R31, R1
113         BZ              $+6
114         JARL    vRegTestFailed, lp
115         MOV             0x02020202, R31
116         CMP             R31, R2
117         BZ              $+6
118         JARL    vRegTestFailed, lp
119         MOV             0x04040404, R31
120         CMP             R31, R5
121         BZ              $+6
122         JARL    vRegTestFailed, lp
123         MOV             0x05050505, R31
124         CMP             R31, R6
125         BZ              $+6
126         JARL    vRegTestFailed, lp
127         MOV             0x06060606, R31
128         CMP             R31, R7
129         BZ              $+6
130         JARL    vRegTestFailed, lp
131         MOV             0x07070707, R31
132         CMP             R31, R8
133         BZ              $+6
134         JARL    vRegTestFailed, lp
135         MOV             0x08080808, R31
136         CMP             R31, R9
137         BZ              $+6
138         JARL    vRegTestFailed, lp
139         MOV             0x09090909, R31
140         CMP             R31, R10
141         BZ              $+6
142         JARL    vRegTestFailed, lp
143         MOV             0x0a0a0a0a, R31
144         CMP             R31, R11
145         BZ              $+6
146         JARL    vRegTestFailed, lp
147         MOV             0x0b0b0b0b, R31
148         CMP             R31, R12
149         BZ              $+6
150         JARL    vRegTestFailed, lp
151         MOV             0x0c0c0c0c, R31
152         CMP             R31, R13
153         BZ              $+6
154         JARL    vRegTestFailed, lp
155         MOV             0x0d0d0d0d, R31
156         CMP             R31, R14
157         BZ              $+6
158         JARL    vRegTestFailed, lp
159         MOV             0x0e0e0e0e, R31
160         CMP             R31, R15
161         BZ              $+6
162         JARL    vRegTestFailed, lp
163         MOV             0x0f0f0f0f, R31
164         CMP             R31, R16
165         BZ              $+6
166         JARL    vRegTestFailed, lp
167         MOV             0x10101010, R31
168         CMP             R31, R17
169         BZ              $+6
170         JARL    vRegTestFailed, lp
171         MOV             0x11111111, R31
172         CMP             R31, R18
173         BZ              $+6
174         JARL    vRegTestFailed, lp
175         MOV             0x12121212, R31
176         CMP             R31, R19
177         BZ              $+6
178         JARL    vRegTestFailed, lp
179         MOV             0x13131313, R31
180         CMP             R31, R20
181         BZ              $+6
182         JARL    vRegTestFailed, lp
183         MOV             0x14141414, R31
184         CMP             R31, R21
185         BZ              $+6
186         JARL    vRegTestFailed, lp
187         MOV             0x15151515, R31
188         CMP             R31, R22
189         BZ              $+6
190         JARL    vRegTestFailed, lp
191         MOV             0x16161616, R31
192         CMP             R31, R23
193         BZ              $+6
194         JARL    vRegTestFailed, lp
195         MOV             0x17171717, R31
196         CMP             R31, R24
197         BZ              $+6
198         JARL    vRegTestFailed, lp
199 #if ( configDATA_MODE == 1 )
200         MOV             0x18181818, R31
201         CMP             R31, R25
202         BZ              $+6
203         JARL    vRegTestFailed, lp
204 #endif
205         MOV             0x19191919, R31
206         CMP             R31, R26
207         BZ              $+6
208         JARL    vRegTestFailed, lp
209         MOV             0x20202020, R31
210         CMP             R31, R27
211         BZ              $+6
212         JARL    vRegTestFailed, lp
213         MOV             0x21212121, R31
214         CMP             R31, R28
215         BZ              $+6
216         JARL    vRegTestFailed, lp
217         MOV             0x22222222, R31
218         CMP             R31, R29
219         BZ              $+6
220         JARL    vRegTestFailed, lp
221         MOV             0x23232323, R31
222         CMP             R31, R30
223         BZ              $+6
224         JARL    vRegTestFailed, lp
225         MOV             vReg1TestLoopStart, R31 
226         JMP             [R31]
227
228 ;------------------------------------------------------------------------------
229 ;------------------------------------------------------------------------------ 
230     RSEG CODE:CODE
231 vRegTest2:
232     MOV         0xa101010b, R1
233     MOV         0xa202020b, R2
234         ; Ignore R3 and R4 as these are the stack and global pointers respectively.
235         MOV             0xa404040b, R5
236         MOV             0xa505050b, R6
237         MOV             0xa606060b, R7
238         MOV             0xa707070b, R8
239         MOV             0xa808080b, R9
240         MOV             0xa909090b, R10
241         MOV             0xaa0a0a0b, R11
242         MOV             0xab0b0b0b, R12
243         MOV             0xac0c0c0b, R13
244         MOV             0xad0d0d0b, R14
245         MOV             0xae0e0e0b, R15
246         MOV             0xaf0f0f0b, R16
247         MOV             0xa010101b, R17
248         MOV             0xa111111b, R18
249         MOV             0xa212121b, R19
250         MOV             0xa313131b, R20
251         MOV             0xa414141b, R21
252         MOV             0xa515151b, R22
253         MOV             0xa616161b, R23
254         MOV             0xa717171b, R24
255 #if ( configDATA_MODE == 1 )
256         ;R25 is used as a base register except when the tiny model is used. */
257         MOV             0xa818181b, R25
258 #endif
259         MOV             0xa919191b, R26
260         MOV             0xa020202b, R27
261         MOV             0xa121212b, R28
262         MOV             0xa222222b, R29
263         MOV             0xa323232b, R30
264         
265 vReg2TestLoopStart:
266         MOV             0xa101010b, R31
267         CMP             R31, R1
268         BZ              $+6
269         JARL    vRegTestFailed, lp
270         MOV             0xa202020b, R31
271         CMP             R31, R2
272         BZ              $+6
273         JARL    vRegTestFailed, lp
274         MOV             0xa404040b, R31
275         CMP             R31, R5
276         BZ              $+6
277         JARL    vRegTestFailed, lp
278         MOV             0xa505050b, R31
279         CMP             R31, R6
280         BZ              $+6
281         JARL    vRegTestFailed, lp
282         MOV             0xa606060b, R31
283         CMP             R31, R7
284         BZ              $+6
285         JARL    vRegTestFailed, lp
286         MOV             0xa707070b, R31
287         CMP             R31, R8
288         BZ              $+6
289         JARL    vRegTestFailed, lp
290         MOV             0xa808080b, R31
291         CMP             R31, R9
292         BZ              $+6
293         JARL    vRegTestFailed, lp
294         MOV             0xa909090b, R31
295         CMP             R31, R10
296         BZ              $+6
297         JARL    vRegTestFailed, lp
298         MOV             0xaa0a0a0b, R31
299         CMP             R31, R11
300         BZ              $+6
301         JARL    vRegTestFailed, lp
302         MOV             0xab0b0b0b, R31
303         CMP             R31, R12
304         BZ              $+6
305         JARL    vRegTestFailed, lp
306         MOV             0xac0c0c0b, R31
307         CMP             R31, R13
308         BZ              $+6
309         JARL    vRegTestFailed, lp
310         MOV             0xad0d0d0b, R31
311         CMP             R31, R14
312         BZ              $+6
313         JARL    vRegTestFailed, lp
314         MOV             0xae0e0e0b, R31
315         CMP             R31, R15
316         BZ              $+6
317         JARL    vRegTestFailed, lp
318         MOV             0xaf0f0f0b, R31
319         CMP             R31, R16
320         BZ              $+6
321         JARL    vRegTestFailed, lp
322         MOV             0xa010101b, R31
323         CMP             R31, R17
324         BZ              $+6
325         JARL    vRegTestFailed, lp
326         MOV             0xa111111b, R31
327         CMP             R31, R18
328         BZ              $+6
329         JARL    vRegTestFailed, lp
330         MOV             0xa212121b, R31
331         CMP             R31, R19
332         BZ              $+6
333         JARL    vRegTestFailed, lp
334         MOV             0xa313131b, R31
335         CMP             R31, R20
336         BZ              $+6
337         JARL    vRegTestFailed, lp
338         MOV             0xa414141b, R31
339         CMP             R31, R21
340         BZ              $+6
341         JARL    vRegTestFailed, lp
342         MOV             0xa515151b, R31
343         CMP             R31, R22
344         BZ              $+6
345         JARL    vRegTestFailed, lp
346         MOV             0xa616161b, R31
347         CMP             R31, R23
348         BZ              $+6
349         JARL    vRegTestFailed, lp
350         MOV             0xa717171b, R31
351         CMP             R31, R24
352         BZ              $+6
353         JARL    vRegTestFailed, lp
354 #if ( configDATA_MODE == 1 )
355         MOV             0xa818181b, R31
356         CMP             R31, R25
357         BZ              $+6
358         JARL    vRegTestFailed, lp
359 #endif
360         MOV             0xa919191b, R31
361         CMP             R31, R26
362         BZ              $+6
363         JARL    vRegTestFailed, lp
364         MOV             0xa020202b, R31
365         CMP             R31, R27
366         BZ              $+6
367         JARL    vRegTestFailed, lp
368         MOV             0xa121212b, R31
369         CMP             R31, R28
370         BZ              $+6
371         JARL    vRegTestFailed, lp
372         MOV             0xa222222b, R31
373         CMP             R31, R29
374         BZ              $+6
375         JARL    vRegTestFailed, lp
376         MOV             0xa323232b, R31
377         CMP             R31, R30
378         BZ              $+6
379         JARL    vRegTestFailed, lp
380         MOV             vReg2TestLoopStart, R31 
381         JMP             [R31]
382
383       END
384