1
2
3
4
5
6
7
8
9
10
11#define ASSEMBLY
12
13#include <asm/linkage.h>
14
15 .global SYMBOL_NAME(_start)
16 .global SYMBOL_NAME(_command_line)
17 .global SYMBOL_NAME(_platform_gpio_table)
18 .global SYMBOL_NAME(_target_name)
19
20 .h8300h
21 .section .text
22 .file "crt0_rom.S"
23
24
25SYMBOL_NAME_LABEL(_start)
26 mov.l
27 ldc
28
29
30
31
32 mov.l
33 mov.l
34 sub.l er5,er4
35 shlr er4
36 shlr er4
37 sub.l er0,er0
381:
39 mov.l er0,@er5
40 adds
41 dec.l
42 bne 1b
43
44
45
46
47 mov.l
48 mov.l
49 mov.l
50 sub.l er6,er4
51 shlr.l er4
52 shlr.l er4
531:
54 mov.l @er5+,er0
55 mov.l er0,@er6
56 adds
57 dec.l
58 bne 1b
59#endif
60
61
62 mov.l
63 mov.l
64 mov.w
65 eepmov.w
66
67
68 ldc
69 mov.l
70 add.l
71 jsr @_start_kernel
72_exit:
73
74 jmp _exit
75
76 rts
77
78
79__platform_gpio_table:
80 mov.l
81 rts
82
83gpio_table:
84 ;; P1DDR
85 .byte 0x00,0x00
86 ;; P2DDR
87 .byte 0x00,0x00
88 ;; P3DDR
89 .byte 0x00,0x00
90 ;; P4DDR
91 .byte 0x00,0x00
92 ;; P5DDR
93 .byte 0x00,0x00
94 ;; P6DDR
95 .byte 0x00,0x00
96 ;; dummy
97 .byte 0x00,0x00
98 ;; P8DDR
99 .byte 0x00,0x00
100 ;; P9DDR
101 .byte 0x00,0x00
102 ;; PADDR
103 .byte 0x00,0x00
104 ;; PBDDR
105 .byte 0x00,0x00
106
107 .section .rodata
108__target_name:
109 .asciz "generic"
110
111 .section .bss
112__command_line:
113 .space 512
114
115
116 .section .vectors,"ax"
117 .long __start
118vector = 1
119 .rept 64-1
120 .long _interrupt_redirect_table+vector*4
121vector = vector + 1
122 .endr
123