btxcsu.S revision 43561
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# $Id: btxcsu.s,v 1.2 1998/10/04 21:15:45 rnordier Exp $ 17 18# 19# BTX C startup code (ELF). 20# 21 22# 23# Globals. 24# 25 .global _start 26# 27# Constants. 28# 29 .set ARGADJ,0xfa0 # Argument adjustment 30# 31# Client entry point. 32# 33_start: movl %eax,__base # Set base address 34 movl %esp,%eax # Set 35 addl $ARGADJ,%eax # argument 36 movl %eax,__args # pointer 37 call main # Invoke client main() 38 call exit # Invoke client exit() 39# 40# Data. 41# 42 .comm __base,4 # Client base address 43 .comm __args,4 # Client arguments 44