mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-29 01:39:41 +03:00
7ad5e56087
git-svn-id: svn://kolibrios.org@704 a494cfbc-eb01-0410-851d-a64ba20cac60
162 lines
5.0 KiB
NASM
162 lines
5.0 KiB
NASM
;*****************************************************************************
|
|
;*
|
|
;* 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: C runtime read/write data (386 version).
|
|
;*
|
|
;*****************************************************************************
|
|
|
|
|
|
name crwdata
|
|
|
|
.387
|
|
.386p
|
|
|
|
assume nothing
|
|
|
|
DGROUP group _DATA
|
|
|
|
_TEXT segment byte public 'CODE'
|
|
assume cs:_TEXT
|
|
__null_FPE_rtn proc near
|
|
ret
|
|
__null_FPE_rtn endp
|
|
_TEXT ends
|
|
|
|
_DATA segment dword public 'DATA'
|
|
|
|
assume DS:DGROUP
|
|
|
|
extrn ___cmdline : near
|
|
extrn ___pgmname : near
|
|
|
|
_LpCmdLine dd offset ___cmdline ; pointer to raw command line
|
|
_LpPgmName dd offset ___pgmname ; pointer to program name (for argv[0])
|
|
|
|
|
|
ifndef __NETWARE__
|
|
_dynend dd 0 ; top of dynamic data area
|
|
_curbrk dd 0 ; top of usable memory
|
|
endif
|
|
|
|
_STACKLOW dd 0 ; lowest address in stack
|
|
_STACKTOP dd 0 ; highest address in stack
|
|
__EFG_printf dd 0
|
|
__EFG_scanf dd 0
|
|
__ASTACKSIZ dd 0 ; alternate stack size
|
|
__ASTACKPTR dd 0 ; alternate stack pointer
|
|
|
|
ifndef __NETWARE__
|
|
_cbyte dd 0 ; used by getch, getche
|
|
_cbyte2 dd 0 ; used by getch, getche
|
|
_child dd 0 ; non-zero => a spawned process is running
|
|
endif
|
|
|
|
__no87 dw 0 ; non-zero => "NO87" environment var present
|
|
ifndef __NETWARE__
|
|
ifdef __DOS__
|
|
_Extender db 0 ; see clib\h\extender.inc for values
|
|
_ExtenderSubtype db 0 ; non-zero -> variant of extender
|
|
__X32VM db 0 ; non-zero => X-32VM DOS Extender
|
|
endif
|
|
_Envptr dd 0 ; offset part of environment pointer
|
|
_Envseg dw 0 ; segment containing environment strings
|
|
ifndef __QNX__
|
|
ifndef __LINUX__
|
|
_osmajor db 0 ; major DOS version number
|
|
_osminor db 0 ; minor DOS version number
|
|
ifdef __NT__
|
|
_osbuild dw 0 ; operating system build number
|
|
_osver dd 0 ; operating system build number
|
|
_winmajor dd 0 ; operating system major version number
|
|
_winminor dd 0 ; operating system minor version number
|
|
_winver dd 0 ; operating system version number
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
__FPE_handler dd __null_FPE_rtn ; FPE handler
|
|
|
|
|
|
ifndef __QNX__
|
|
ifndef __LINUX__
|
|
ifndef __NETWARE__
|
|
public "C",_osmajor
|
|
public "C",_osminor
|
|
ifdef __NT__
|
|
public "C",_osbuild
|
|
public "C",_osver
|
|
public "C",_winmajor
|
|
public "C",_winminor
|
|
public "C",_winver
|
|
public "C",__EFG_printf
|
|
public "C",__EFG_scanf
|
|
endif
|
|
endif
|
|
ifdef __DOS__
|
|
public "C",_psp
|
|
public "C",_Extender
|
|
public "C",_ExtenderSubtype
|
|
public __X32VM
|
|
public __x386_stacklow
|
|
endif
|
|
ifndef _NETWARE_LIBC
|
|
public "C",_LpCmdLine
|
|
public "C",_LpPgmName
|
|
endif
|
|
ifdef __NT__
|
|
public "C",_LpCmdLine
|
|
public "C",_LpPgmName
|
|
endif
|
|
ifdef __OS2__
|
|
public "C",_LpDllName
|
|
public "C",_LpwCmdLine
|
|
public "C",_LpwPgmName
|
|
public "C",_LpwDllName
|
|
endif
|
|
endif
|
|
endif
|
|
ifndef __NETWARE__
|
|
public "C",_dynend
|
|
public "C",_curbrk
|
|
endif
|
|
public "C",_STACKLOW
|
|
public "C",_STACKTOP
|
|
public __ASTACKSIZ
|
|
public __ASTACKPTR
|
|
ifndef __NETWARE__
|
|
public "C",_cbyte
|
|
public "C",_cbyte2
|
|
public "C",_child
|
|
public "C",_Envptr
|
|
public "C",_Envseg
|
|
endif
|
|
public __no87
|
|
public "C",__FPE_handler
|
|
|
|
_DATA ends
|
|
|
|
end
|