vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

crt0.S (310B)


      1 	.text
      2 	.globl	_start
      3 _start:
      4 	// argc is on stack
      5 	popl	%ebx
      6 	// argv *is* stack (%esp)
      7 	// environ starts at argv+argc+1
      8 	leal 4(%esp,%ebx,4), %eax
      9 	movl %eax, environ
     10 	// call main
     11 	pushl %esp
     12 	pushl %ebx
     13 	call	main
     14 
     15 	pushl	%eax
     16 	call	exit
     17 
     18 1:	jmp	1b
     19 
     20 	.data
     21 	.globl environ
     22 .p2align 2
     23 environ:
     24 	.long 0
     25 
     26 
     27