4.115
Last change
on this file since 38f7c78 was
e6386f7,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/15/14 at 14:31:03
|
h8300/h8sim: Exit simulator cleanly
|
-
Property mode set to
100644
|
File size:
835 bytes
|
Line | |
---|
1 | ; h8/300 and h8/300h start up file. |
---|
2 | |
---|
3 | #ifdef __H8300__ |
---|
4 | |
---|
5 | .text |
---|
6 | .global _start |
---|
7 | _start: |
---|
8 | mov.w #_stack_init,sp |
---|
9 | mov.w #_edata,r0 |
---|
10 | mov.w #_clear_end,r1 |
---|
11 | mov.w #0,r2 |
---|
12 | .loop: mov.w r2,@r0 |
---|
13 | adds #2,r0 |
---|
14 | cmp r1,r0 |
---|
15 | blo .loop |
---|
16 | mov.w #0,r0 ; pass in NULL |
---|
17 | jsr @_boot_card |
---|
18 | .global _bsp_reset |
---|
19 | _bsp_reset: |
---|
20 | mov.w #0,r0 ; indicate reason to exit |
---|
21 | sleep |
---|
22 | jmp @_start ; restart |
---|
23 | #else |
---|
24 | |
---|
25 | #if defined(__H8300H__) |
---|
26 | .h8300h |
---|
27 | #else /* must be __H300S__ */ |
---|
28 | .h8300s |
---|
29 | #endif |
---|
30 | .text |
---|
31 | .global _start |
---|
32 | _start: |
---|
33 | mov.l #_stack_init,sp |
---|
34 | mov.l #_edata,er0 |
---|
35 | mov.l #_clear_end,er1 |
---|
36 | mov.w #0,r2 ; not sure about alignment requirements |
---|
37 | .loop: mov.w r2,@er0 ; playing it safe for now |
---|
38 | adds #2,er0 |
---|
39 | cmp.l er1,er0 |
---|
40 | blo .loop |
---|
41 | jsr @_boot_card |
---|
42 | .global _bsp_reset |
---|
43 | _bsp_reset: |
---|
44 | mov.w #0,r0 ; indicate reason to exit |
---|
45 | sleep |
---|
46 | jmp @_start ; restart |
---|
47 | |
---|
48 | #endif /* end of H8300 */ |
---|
Note: See
TracBrowser
for help on using the repository browser.