aboutsummaryrefslogtreecommitdiffstats
path: root/c/crt0.s
blob: cde4b67013ea3dc9988fbec710570a1d3f85d198 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
	.module crt0
	.globl _main
	;; gbos C entry. exec() maps our ROM bank and jumps to the start of _CODE
	;; (linked at 0x4000). Call main(), then exit(0). exec() already set SP.
	.area _CODE
_start::
	call	_main
	ld	b, #0
	ld	c, #0		; SYS_EXIT
	rst	#0x30
1$:	jr	1$