xref: /plan9/sys/src/9/omap/init9.s (revision 7bb09086fec348be50030fb14451453b0595cf22)
1/*
2 * This is the same as the C programme:
3 *
4 *	void
5 *	main(char* argv0)
6 *	{
7 *		startboot(argv0, &argv0);
8 *	}
9 *
10 * It is in assembler because SB needs to be
11 * set and doing this in C drags in too many
12 * other routines.
13 */
14TEXT main(SB), 1, $8
15	MOVW	$setR12(SB), R12		/* load the SB */
16	MOVW	$boot(SB), R0
17
18	ADD	$12, R13, R1			/* pointer to 0(FP) */
19
20	MOVW	R0, 4(R13)			/* pass argc, argv */
21	MOVW	R1, 8(R13)
22
23	BL	startboot(SB)
24_loop:
25	B	_loop
26