- 220 -
75 ;--------------------------------------------------------
76 ; bss zero clear
77 ;--------------------------------------------------------
78 ;-------------------------------------------------------;
79 ; zero clear BSS ;
80 ;-------------------------------------------------------;
81 BZERO bss_SB8_top, bss_SB8
82 ; BZERO bss_SB16_top, bss_SB16
83 BZERO bss_NEAR_top, bss_NEAR
84 BZERO bss_FAR_top, bss_FAR
85 BZERO bss_EXT_top, bss_EXT
86 BZERO bss_MON1_top, bss_MON1
87 BZERO bss_MON2_top, bss_MON2
88 BZERO bss_MON3_top, bss_MON3
89 BZERO bss_MON4_top, bss_MON4
90
91 ;--------------------------------------------------------
92 ; initialize data section
93 ;--------------------------------------------------------
94 ;-------------------------------------------------------;
95 ; initialize DATA ;
96 ;-------------------------------------------------------;
97 BCOPY data_SB8_INIT_top, data_SB8_top, data_SB8
98 ; BCOPY data_SB16_INIT_top, data_SB16_top, data_SB16
99 BCOPY data_NEAR_INIT_top, data_NEAR_top, data_NEAR
100 BCOPY data_FAR_INIT_top, data_FAR_top, data_FAR
101 BCOPY data_EXT_INIT_top, data_EXT_top, data_EXT
102 BCOPY data_MON1_INIT_top, data_MON1_top, data_MON1
103 BCOPY data_MON2_INIT_top, data_MON2_top, data_MON2
104 BCOPY data_MON3_INIT_top, data_MON3_top, data_MON3
105 BCOPY data_MON4_INIT_top, data_MON4_top, data_MON4
106
107
108 ;-----------------------------------------------------------------
109 ; Set System IPL and Set Interrupt Vector
110 ;-----------------------------------------------------------------
111 __INI_IPL ;*G0*
112 LDC #__INT_VECTOR,INTB
113
114 ; +-----------------------------------------------------+
115 ; | System timer interrupt setting |
116 ; +-----------------------------------------------------+
117 .IF USE_TIMER
118 MOV.B #stmr_mod_val,stmr_mod_reg+regoffset ; set timer mode
119 MOV.W #stmr_cnt,stmr_ctr_reg+regoffset ; set interval count
120 MOV.B #stmr_int_IPL,stmr_int_reg ; set timer IPL
121 OR.B #stmr_bit+1,stmr_start+regoffset ; system timer start
122 .ENDIF
123
124 ; +-----------------------------------------------------+
125 ; | System timer initialize |
126 ; +-----------------------------------------------------+
127 .IF USE_SYSTEM_TIME
128 MOV.W #__D_Sys_TIME_L,__Sys_time+4
129 MOV.W #__D_Sys_TIME_M,__Sys_time+2
130 MOV.W #__D_Sys_TIME_H,__Sys_time
131 .ENDIF
132 MOV.L #0,__HEAP_TMR
133
134 ; +-----------------------------------------------------+
135 ; | User Initial Routine ( if there are ) |
136 ; +-----------------------------------------------------+
137 ; Initialize standard I/O
138 ; .GLB __init
139 ; JSR.A __init
140
141 ; +-----------------------------------------------------+
142 ; | Initalization of System Data Area |
143 ; +-----------------------------------------------------+
144 .GLB
__init_heap
145 JSR.W __init_sys
146 JSR.W __init_tsk
147 JSR.W __init_heap
148 .IF __NUM_FLG
149 .GLB __init_flg
150 JSR.W __init_flg
151 .ENDIF
152
153 .IF __NUM_SEM
154 .GLB __init_sem