btxcsu.S revision 50477
1235633Sdim# 2193323Sed# Copyright (c) 1998 Robert Nordier 3193323Sed# All rights reserved. 4193323Sed# 5193323Sed# Redistribution and use in source and binary forms are freely 6193323Sed# permitted provided that the above copyright notice and this 7193323Sed# paragraph and the following disclaimer are duplicated in all 8193323Sed# such forms. 9193323Sed# 10193323Sed# This software is provided "AS IS" and without any express or 11193323Sed# implied warranties, including, without limitation, the implied 12193323Sed# warranties of merchantability and fitness for a particular 13193323Sed# purpose. 14193323Sed# 15193323Sed 16193323Sed# $FreeBSD: head/sys/boot/pc98/btx/lib/btxcsu.s 50477 1999-08-28 01:08:13Z peter $ 17193323Sed 18193323Sed# 19193323Sed# BTX C startup code (ELF). 20193323Sed# 21193323Sed 22193323Sed# 23193323Sed# Globals. 24193323Sed# 25193323Sed .global _start 26193323Sed# 27193323Sed# Constants. 28193323Sed# 29193323Sed .set ARGADJ,0xfa0 # Argument adjustment 30193323Sed# 31193323Sed# Client entry point. 32193323Sed# 33193323Sed_start: movl %eax,__base # Set base address 34193323Sed movl %esp,%eax # Set 35193323Sed addl $ARGADJ,%eax # argument 36193323Sed movl %eax,__args # pointer 37193323Sed call main # Invoke client main() 38193323Sed call exit # Invoke client exit() 39193323Sed# 40193323Sed# Data. 41193323Sed# 42193323Sed .comm __base,4 # Client base address 43193323Sed .comm __args,4 # Client arguments 44193323Sed