Subversion Repositories Kolibri OS

Rev

Rev 548 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 548 Rev 704
Line 38... Line 38...
38
        name    segdefns
38
        name    segdefns
39
.386p
39
.386p
Line 40... Line 40...
40
 
40
 
Line -... Line 41...
-
 
41
        assume  nothing
-
 
42
 
-
 
43
        extrn   _cstart_         : near
Line 41... Line -...
41
        assume  nothing
-
 
42
 
-
 
43
  
44
        extrn   __STACKLOW       : near
44
if COMP_CFG_COFF
-
 
45
DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,_BSS,STACK
45
        extrn   __STACKTOP       : near
46
else
-
 
47
ifdef __LINUX__
-
 
48
DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE,_BSS
-
 
49
else
-
 
Line 50... Line 46...
50
DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,_BSS,STACK,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE
46
 
51
endif
47
  
52
endif
48
DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE,_IEND,_BSS,STACK,MEMSIZE
53
 
49
 
Line 54... Line 50...
54
; this guarantees that no function pointer will equal NULL
50
; this guarantees that no function pointer will equal NULL
55
; (WLINK will keep segment 'BEGTEXT' in front)
51
; (WLINK will keep segment 'BEGTEXT' in front)
56
; This segment must be at least 4 bytes in size to avoid confusing the
52
; This segment must be at least 4 bytes in size to avoid confusing the
-
 
53
; signal function.
-
 
54
 
-
 
55
BEGTEXT segment use32 word public 'CODE'
-
 
56
        assume  cs:BEGTEXT
-
 
57
forever label   near
-
 
58
 
-
 
59
        db 'MENUET01'
-
 
60
        dd 0x0001
-
 
61
        dd offset _cstart_
-
 
62
        dd offset ___iend
57
; signal function.
63
        dd offset MEMSIZE
58
 
64
        dd offset MEMSIZE
59
BEGTEXT segment use32 word public 'CODE'
65
        dd offset ___cmdline
60
        assume  cs:BEGTEXT
66
        dd offset ___pgmname
61
forever label   near
67
        
Line 121... Line 127...
121
_DATA    ends
127
_DATA    ends
Line 122... Line 128...
122
 
128
 
123
DATA    segment word public 'DATA'
129
DATA    segment word public 'DATA'
Line -... Line 130...
-
 
130
DATA    ends
-
 
131
 
-
 
132
_IEND   segment word public 'IEND'
-
 
133
___iend  label byte
124
DATA    ends
134
_IEND   ends
125
 
-
 
Line 126... Line 135...
126
_BSS    segment word public 'BSS'
135
 
127
_BSS    ends
136
_BSS    segment word public 'BSS'
-
 
137
 
-
 
138
        public ___cmdline
-
 
139
        public ___pgmname
-
 
140
        
-
 
141
___cmdline   db 256 dup(?)          ; pointer to raw command line
Line 128... Line 142...
128
 
142
___pgmname   db 1024 dup (?)        ; pointer to program name (for argv[0])
-
 
143
 
-
 
144
_BSS    ends
129
ifndef __LINUX__
145
 
-
 
146
STACK   segment para stack 'STACK'
130
STACK_SIZE      equ     4096h
147
 
-
 
148
___stack_low label byte
-
 
149
        public ___stack_low
131
 
150
 
-
 
151
STACK   ends
Line 132... Line 152...
132
STACK   segment para stack 'STACK'
152
 
133
        db      (STACK_SIZE) dup(?)
153
MEMSIZE   segment para stack 'STACK'
Line 134... Line 154...
134
STACK   ends
154
MEMSIZE   ends