Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
[dragonfly.git] / sys / boot / pc32 / btx / lib / btxcsu.S
1 #
2 # Copyright (c) 1998 Robert Nordier
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are freely
6 # permitted provided that the above copyright notice and this
7 # paragraph and the following disclaimer are duplicated in all
8 # such forms.
9 #
10 # This software is provided "AS IS" and without any express or
11 # implied warranties, including, without limitation, the implied
12 # warranties of merchantability and fitness for a particular
13 # purpose.
14 #
15
16 # $FreeBSD: src/sys/boot/i386/btx/lib/btxcsu.s,v 1.3 1999/08/28 00:40:07 peter Exp $
17 # $DragonFly: src/sys/boot/pc32/btx/lib/btxcsu.S,v 1.3 2003/11/10 06:08:35 dillon Exp $
18
19 #
20 # BTX C startup code (ELF).
21 #
22
23 #
24 # Globals.
25 #
26                 .global _start
27 #
28 # Constants.
29 #
30                 .set ARGADJ,0xfa0               # Argument adjustment
31 #
32 # Client entry point.
33 #
34 _start:         movl %eax,__base                # Set base address
35                 movl %esp,%eax                  # Set
36                 addl $ARGADJ,%eax               #  argument
37                 movl %eax,__args                #  pointer
38                 call main                       # Invoke client main()
39                 call exit                       # Invoke client exit()
40 #
41 # Data.
42 #
43                 .comm __base,4                  # Client base address
44                 .comm __args,4                  # Client arguments