forked from KolibriOS/kolibrios
add fstatus.inc
git-svn-id: svn://kolibrios.org@702 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Open Watcom Project
|
||||
*
|
||||
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original
|
||||
* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
* Public License version 1.0 (the 'License'). You may not use this file
|
||||
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
* provided with the Original Code and Modifications, and is also
|
||||
* available at www.sybase.com/developer/opensource.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
* governing rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Description: 80x87 related globals for OSI.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "variety.h"
|
||||
|
||||
unsigned char _8087;
|
||||
unsigned char _real87;
|
@@ -270,7 +270,7 @@ extern void __chk8087( void )
|
||||
void __chk8087( void )
|
||||
/********************/
|
||||
{
|
||||
_RWD_real87 = 3; //387+ ; //__x87id();
|
||||
_RWD_real87 = __x87id();
|
||||
_RWD_8087 = _RWD_real87;
|
||||
__init_8087();
|
||||
}
|
||||
|
53
programs/develop/open watcom/trunk/clib/crt/cmodel.asm
Normal file
53
programs/develop/open watcom/trunk/clib/crt/cmodel.asm
Normal file
@@ -0,0 +1,53 @@
|
||||
;*****************************************************************************
|
||||
;*
|
||||
;* Open Watcom Project
|
||||
;*
|
||||
;* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
;*
|
||||
;* ========================================================================
|
||||
;*
|
||||
;* This file contains Original Code and/or Modifications of Original
|
||||
;* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
;* Public License version 1.0 (the 'License'). You may not use this file
|
||||
;* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
;* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
;* provided with the Original Code and Modifications, and is also
|
||||
;* available at www.sybase.com/developer/opensource.
|
||||
;*
|
||||
;* The Original Code and all software distributed under the License are
|
||||
;* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
;* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
;* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
;* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
;* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
;* governing rights and limitations under the License.
|
||||
;*
|
||||
;* ========================================================================
|
||||
;*
|
||||
;* Description: WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
|
||||
;* DESCRIBE IT HERE!
|
||||
;*
|
||||
;*****************************************************************************
|
||||
|
||||
|
||||
include mdef.inc
|
||||
|
||||
modstart cmodel
|
||||
|
||||
if _MODEL and _BIG_CODE
|
||||
public _big_code_
|
||||
_big_code_ label far
|
||||
else
|
||||
public _small_code_
|
||||
_small_code_ label near
|
||||
endif
|
||||
;
|
||||
; This is here so that if both _small_code_ and _big_code_ get hauled
|
||||
; in from seperate libraries, the linker will complain about
|
||||
; CodeModelMismatch being redefined
|
||||
;
|
||||
public CodeModelMismatch
|
||||
CodeModelMismatch label near
|
||||
|
||||
endmod
|
||||
end
|
@@ -153,7 +153,11 @@ static void callit( pfn *f ) {
|
||||
; eax==15 -> run init routines whose priority is <= 15
|
||||
;
|
||||
*/
|
||||
|
||||
#if defined(M_I86)
|
||||
void _WCI86FAR __FInitRtns( unsigned limit ) {
|
||||
__InitRtns( limit );
|
||||
}
|
||||
#endif
|
||||
void __InitRtns( unsigned limit ) {
|
||||
__type_rtp local_limit;
|
||||
struct rt_init _WCI86NEAR *pnext;
|
||||
@@ -175,13 +179,11 @@ void __InitRtns( unsigned limit ) {
|
||||
working_limit = local_limit;
|
||||
|
||||
// walk list of routines
|
||||
while( pcur < (struct rt_init _WCI86NEAR*)&_End_XI )
|
||||
{
|
||||
while( pcur < (struct rt_init _WCI86NEAR*)&_End_XI ) {
|
||||
// if this one hasn't been called
|
||||
if( pcur->rtn_type != PDONE ) {
|
||||
// if the priority is better than best so far
|
||||
if( pcur->priority <= working_limit )
|
||||
{
|
||||
if( pcur->priority <= working_limit ) {
|
||||
// remember this one
|
||||
pnext = pcur;
|
||||
working_limit = pcur->priority;
|
||||
@@ -224,9 +226,7 @@ void _WCI86FAR __FFiniRtns( unsigned min_limit, unsigned max_limit ) {
|
||||
__FiniRtns( min_limit, max_limit );
|
||||
}
|
||||
#endif
|
||||
|
||||
void __FiniRtns( unsigned min_limit, unsigned max_limit )
|
||||
{
|
||||
void __FiniRtns( unsigned min_limit, unsigned max_limit ) {
|
||||
__type_rtp local_min_limit;
|
||||
__type_rtp local_max_limit;
|
||||
struct rt_init _WCI86NEAR *pnext;
|
||||
|
@@ -41,34 +41,48 @@
|
||||
#include "initfini.h"
|
||||
#include "initarg.h"
|
||||
|
||||
void _cdecl mf_init();
|
||||
void _stdcall InitHeap(int heap_size);
|
||||
int __appcwdlen;
|
||||
char* __appcwd;
|
||||
|
||||
_WCRTLINK void (*__process_fini)(unsigned,unsigned) = 0;
|
||||
|
||||
extern void __CommonInit( void );
|
||||
extern int wmain( int, wchar_t ** );
|
||||
extern int main( int, char ** );
|
||||
extern char *LpCmdLine;
|
||||
extern char *LpPgmName;
|
||||
|
||||
_WCRTLINK void (*__process_fini)(unsigned,unsigned) = 0;
|
||||
|
||||
#ifdef __SW_BR
|
||||
_WCRTLINK extern void (*__process_fini)( unsigned, unsigned );
|
||||
extern void __CommonInit( void );
|
||||
extern int wmain( int, wchar_t ** );
|
||||
extern int main( int, char ** );
|
||||
#else
|
||||
extern void __NTMainInit( void *, void * );
|
||||
#ifdef __WIDECHAR__
|
||||
extern void __wCMain( void );
|
||||
#if defined(_M_IX86)
|
||||
#pragma aux __wCMain "*"
|
||||
#endif
|
||||
#else
|
||||
extern void __CMain( void );
|
||||
#if defined(_M_IX86)
|
||||
#pragma aux __CMain "*"
|
||||
#endif
|
||||
#endif
|
||||
extern unsigned __ThreadDataSize;
|
||||
#endif
|
||||
|
||||
void __F_NAME(__NTMain,__wNTMain)( void )
|
||||
/***************************************/
|
||||
{
|
||||
|
||||
InitHeap(32*1024*1024);
|
||||
//mf_init();
|
||||
|
||||
|
||||
__process_fini = &__FiniRtns;
|
||||
InitHeap(0);
|
||||
|
||||
__process_fini = &__FiniRtns;
|
||||
__InitRtns( 255 );
|
||||
__CommonInit();
|
||||
|
||||
__appcwdlen = strrchr(_LpPgmName, '/') - _LpPgmName + 1;
|
||||
__appcwdlen = __appcwdlen > 512 ? 512 : __appcwdlen;
|
||||
__appcwd= (char*)malloc(__appcwdlen);
|
||||
__appcwdlen = __appcwdlen > 512 ? 512 : __appcwdlen;
|
||||
__appcwd= (char*)malloc(__appcwdlen);
|
||||
strncpy(__appcwd, _LpPgmName, __appcwdlen);
|
||||
__appcwd[__appcwdlen] = 0;
|
||||
___Argc = 2;
|
||||
@@ -100,6 +114,6 @@ _WCRTLINK void __exit( unsigned ret_code )
|
||||
mov eax, -1
|
||||
int 0x40
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user