-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathstart.s
45 lines (39 loc) · 940 Bytes
/
start.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ===============================================================
/*! @file
@brief R8C スタート・アップ
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2014, 2017 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/R8C/blob/master/LICENSE
*/
# ===============================================================
.text
.global _reset_start
_reset_start:
.global _start
_start:
/* 割り込みスタック設定 */
.extern _isp_init
ldc #_isp_init,isp
/* ユーザースタック設定 */
.extern _usp_init
fset u
ldc #_usp_init,sp
/* 可変ベクターテーブルアドレス設定 */
.extern _variable_vectors_
ldc #_variable_vectors_,intbl
/* 割り込み許可 */
ldipl #0
nop
nop
fset i
.extern __init
jmp.w __init
.global _exit
_exit:
jmp.w _exit
.section .data
.global ___dso_handle
.weak ___dso_handle
___dso_handle:
.long 0