Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/* this is the same as a c program:
2
 * main(char *argv0){
3
 *	startboot(argv0, &argv0);
4
 * }
5
 *
6
 * it is in asm because we need to set the SB before
7
 * doing it and the only way to do this in c drags in
8
 * too many other routines.
9
 */
10
 
11
TEXT	_main(SB),$8
12
 
13
	MOVW	$setSB(SB), R2
14
 
15
	/* make a frame */
16
	SUB	$16,R1
17
 
18
	/* argv0 is already passed to us in R3 so it is already the first arg */
19
 
20
	/* copy argv0 into the stack and push its address as the second arg */
21
	MOVW	R3,0x14(R1)
22
	ADD	$0x14,R1,R6
23
	MOVW	R6,0x8(R1)
24
 
25
	BL	startboot(SB)
26
 
27
	/* should never get here */
28
loop:
29
	BR	loop