summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/board/compal/start.rom.S
blob: 211bea863a223c281e576f80e8cdf1d74e6f1ff2 (plain) (blame)
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

.section .text.start

#include "macros.S"
		
.globl _start
_start:
	/* clear bss section */
	clear_bss

	/* copy data to ram */
	copy_data

	/* copy alway-in-ram code */
	copy_ramtext

	/* initialize all stacks */
	init_stacks

	/* call constructors */
	call_ctors

	/* jump to main */
	ldr	pc, _jump_main

	/* endless loop at end of program */
_loop:
	b	_loop
	b	_start

_jump_main:
	.word main