aboutsummaryrefslogtreecommitdiffstats
path: root/usr/crt0.s
blob: 0d8371fde6e383101c680a0ae64c143429e2c7a3 (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 here ($4000).
	;; Call main(), then exit(0). (Args are fetched on demand via getargs().)
	.area _CODE
_start::
	call	_main
	ld	b, #0
	ld	c, #0			; SYS_EXIT
	rst	#0x30
1$:	jr	1$