| 1 | ;
|
|---|
| 2 | ; SEGMENTS.INC -- Manage segments
|
|---|
| 3 | ;
|
|---|
| 4 | ; Copyright (c) 1991-1999 by Eberhard Mattes
|
|---|
| 5 | ;
|
|---|
| 6 | ; This file is part of emx.
|
|---|
| 7 | ;
|
|---|
| 8 | ; emx is free software; you can redistribute it and/or modify it
|
|---|
| 9 | ; under the terms of the GNU General Public License as published by
|
|---|
| 10 | ; the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 11 | ; any later version.
|
|---|
| 12 | ;
|
|---|
| 13 | ; emx is distributed in the hope that it will be useful,
|
|---|
| 14 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 16 | ; GNU General Public License for more details.
|
|---|
| 17 | ;
|
|---|
| 18 | ; You should have received a copy of the GNU General Public License
|
|---|
| 19 | ; along with emx; see the file COPYING. If not, write to
|
|---|
| 20 | ; the Free Software Foundation, 59 Temple Place - Suite 330,
|
|---|
| 21 | ; Boston, MA 02111-1307, USA.
|
|---|
| 22 | ;
|
|---|
| 23 | ; See emx.asm for a special exception.
|
|---|
| 24 | ;
|
|---|
| 25 |
|
|---|
| 26 | A_DATA32 = 4093H ; Accessed, writable, expand up, big
|
|---|
| 27 | A_READ32 = 4091H ; Accessed, expand up, big
|
|---|
| 28 | A_CODE32 = 409BH ; Accessed, readable, non-conforming, default=32
|
|---|
| 29 | A_LDT = 0082H ; LDT
|
|---|
| 30 | A_TSS = 0089H ; TSS
|
|---|
| 31 |
|
|---|
| 32 | DPL_0 = 0000H
|
|---|
| 33 | DPL_1 = 0020H
|
|---|
| 34 | DPL_2 = 0040H
|
|---|
| 35 | DPL_3 = 0060H
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | IFNDEF __SEGMENTS
|
|---|
| 39 |
|
|---|
| 40 | SV_DATA SEGMENT
|
|---|
| 41 |
|
|---|
| 42 | EXTRN NEW_TSS:BYTE
|
|---|
| 43 | EXTRN G_PHYS_BASE:DWORD
|
|---|
| 44 |
|
|---|
| 45 | SV_DATA ENDS
|
|---|
| 46 |
|
|---|
| 47 | SV_CODE SEGMENT
|
|---|
| 48 |
|
|---|
| 49 | EXTRN CREATE_SEG:NEAR, SV_SEGMENT:NEAR
|
|---|
| 50 | EXTRN SEG_SIZE:NEAR, SEG_BASE:NEAR, SEG_ATTR:NEAR
|
|---|
| 51 | EXTRN GET_BASE:NEAR, NULL_SEG:NEAR, GET_LIN:NEAR
|
|---|
| 52 | EXTRN GET_DESC:NEAR, INIT_TSS:NEAR, ADD_PAGES:NEAR
|
|---|
| 53 | EXTRN ACCESS_LOWMEM:NEAR, MAP_PHYS:NEAR
|
|---|
| 54 |
|
|---|
| 55 | SV_CODE ENDS
|
|---|
| 56 |
|
|---|
| 57 | INIT_CODE SEGMENT
|
|---|
| 58 |
|
|---|
| 59 | EXTRN INIT_DESC:NEAR
|
|---|
| 60 | EXTRN RM_SEG_BASE:NEAR
|
|---|
| 61 | EXTRN RM_SEG_SIZE:NEAR
|
|---|
| 62 |
|
|---|
| 63 | INIT_CODE ENDS
|
|---|
| 64 |
|
|---|
| 65 | ENDIF
|
|---|