#
# Copyright (c) 1998 Robert Nordier
# All rights reserved.
#
# Redistribution and use in source and binary forms are freely
# permitted provided that the above copyright notice and this
# paragraph and the following disclaimer are duplicated in all
# such forms.
#
# This software is provided "AS IS" and without any express or
# implied warranties, including, without limitation, the implied
# warranties of merchantability and fitness for a particular
# purpose.
#

#	$Id:$

#
# BTX C startup code (ELF).
#

#
# Globals.
#
		.global _start
#
# Constants.
#
		.set ARGSIZ,0x60		# Size of arguments
#
# Client entry point.
#
_start: 	movl %eax,__base		# Set base address
		subl $ARGSIZ,%esp		# Set argument
		movl %esp,__args		#  pointer
		call main			# Invoke client main()
		call exit			# Invoke client exit()
#
# Data.
#
		.comm __base,4			# Client base address
		.comm __args,4			# Client arguments

#
# Copyright (c) 1998 Robert Nordier
# All rights reserved.
#
# Redistribution and use in source and binary forms are freely
# permitted provided that the above copyright notice and this
# paragraph and the following disclaimer are duplicated in all
# such forms.
#
# This software is provided "AS IS" and without any express or
# implied warranties, including, without limitation, the implied
# warranties of merchantability and fitness for a particular
# purpose.
#

#	$Id: btxcsu.s,v 1.1 1998/09/14 10:37:00 rnordier Exp $

#
# BTX C startup code (ELF).
#

#
# Globals.
#
		.global _start
#
# Constants.
#
		.set ARGADJ,0xfa0		# Argument adjustment
#
# Client entry point.
#
_start: 	movl %eax,__base		# Set base address
		movl %esp,%eax			# Set
		addl $ARGADJ,%eax		#  argument
		movl %eax,__args		#  pointer
		call main			# Invoke client main()
		call exit			# Invoke client exit()
#
# Data.
#
		.comm __base,4			# Client base address
		.comm __args,4			# Client arguments

Adjust setting of argument pointer for BTX 0.87.
Adjust setting of argument pointer for BTX 0.87.
