home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
d
/
djdev108.zip
/
LIB
/
CRT0.S
< prev
next >
Wrap
Text File
|
1992-07-03
|
762b
|
59 lines
/*
** Called as start(argc, argv, envp)
*/
.text
.globl start
start:
movl %esi,___pid
movl %edi,___transfer_buffer
movl %ebx,_ScreenPrimary
movl %ebp,_ScreenSecondary
xorl %esi,%esi
xorl %edi,%edi
xorl %ebp,%ebp
xorl %ebx,%ebx
movl %esp,%ebx
movl 8(%ebx),%eax
pushl %eax
movl %eax,_environ
pushl 4(%ebx)
pushl (%ebx)
call ___main
call _main
addl $12,%esp
pushl %eax
call _exit
exit_again:
movl $0x4c00,%eax
int $0x21
jmp exit_again
ret
.data
.globl _environ
_environ:
.long 0
.globl ___pid
___pid:
.long 0
.globl ___transfer_buffer
___transfer_buffer:
.long 0
.globl _ScreenPrimary
_ScreenPrimary:
.long 0
.globl _ScreenSecondary
_ScreenSecondary:
.long 0