|
|
1.1 root 1: ;
2: ; MODEL286.EQU 5.20A June 8, 1995
3: ;
4: ; DESCRIPTION
5: ;
6: ; This is the header file used by assembly files to determine
7: ; model dependent information. Previously, Greenleaf libraries
8: ; used the file model.h, which had macros for _LCODE, _LDATA, etc.
9: ; This new system allows the user to set the model on the command
10: ; line by defining the GF_MODEL constant. It also prints out a
11: ; helpful (I hope) error message if GF_MODEL is not defined.
12: ;
13: ; This file also has segment definitions for the code used by
14: ; the 286 DOS Extender Fast drivers. If you were to mess with
15: ; those segment definitions, the results would probably be
16: ; very bad.
17: ;
18: ; AUTHOR
19: ; SM
20: ; Copyright (C) 1991-94 Greenleaf Software Inc. All rights reserved.
21: ;
22: ; MODIFICATIONS
23: ;
24: ; December 1, 1994 5.10A : Initial release.
25: ;
26:
27: ;
28: ; The check for ??version is checking to see if we are running under
29: ; Turbo Assembler.
30: ;
31: ifdef ??version
32: mesg_defined = 1
33: mesg macro txt
34: %out txt
35: endm
36: endif
37: ifdef ??Version
38: mesg_defined = 1
39: mesg macro txt
40: %out txt
41: endm
42: endif
43: ifndef mesg_defined
44: mesg macro txt
45: if1
46: %out txt
47: endif
48: endm
49: endif
50:
51: % GF_MODEL&_MODEL = 1
52:
53: ifdef SMALL_MODEL
54: mesg <Small Memory Model>
55: _LCODE = 0
56: _LDATA = 0
57: _HUGE = 0
58: GOOD_MODEL = 0
59: .MODEL SMALL,C
60: endif
61:
62: ifdef COMPACT_MODEL
63: mesg <Compact Memory Model>
64: _LCODE = 0
65: _LDATA = 1
66: _HUGE = 0
67: GOOD_MODEL = 0
68: .MODEL COMPACT,C
69: endif
70:
71: ifdef MEDIUM_MODEL
72: mesg <Medium Memory Model>
73: _LCODE = 1
74: _LDATA = 0
75: _HUGE = 0
76: GOOD_MODEL = 0
77: .MODEL MEDIUM,C
78: endif
79:
80: ifdef LARGE_MODEL
81: mesg <Large Memory Model>
82: _LCODE = 1
83: _LDATA = 1
84: _HUGE = 0
85: GOOD_MODEL = 0
86: .MODEL LARGE,C
87: endif
88:
89: ifdef HUGE_MODEL
90: mesg <Huge Memory Model>
91: _LCODE = 1
92: _LDATA = 1
93: _HUGE = 1
94: GOOD_MODEL = 0
95: .MODEL HUGE,C
96: endif
97:
98: ifdef OTHER_MODEL
99: mesg <Other Memory Model>
100: _LCODE = 1
101: _LDATA = 1
102: _HUGE = 0
103: GOOD_MODEL = 0
104: endif
105:
106: ifndef _LCODE
107: mesg <In order to properly build the assembly files for this>
108: mesg <library, you need to define GF_MODEL so the files can be>
109: mesg <be built for the correct memory model. The best way to>
110: mesg <do this is to define it on the command line, like this:>
111: mesg < >
112: mesg < MASM /DGF_MODEL=SMALL /Ml FILE.ASM ; >
113: mesg < >
114: mesg <Acceptable choices for GF_MODEL are SMALL, COMPACT, MEDIUM,>
115: mesg <LARGE, and HUGE. Note that the Greenleaf Installation programs>
116: mesg <will do this automatically.>
117: mesg < >
118: _LCODE = 0
119: _LDATA = 0
120: _HUGE = 0
121: endif
122:
123: ifndef GOOD_MODEL
124: .ERR
125: endif
126:
127: ;
128: ; Don't rearrange these segments. I have them in this
129: ; order to ensure that everything that needs to get locked
130: ; in memory. If I didn't put the kill segment in between
131: ; these two other guys it might not get properly locked.
132: ;
133: PROT_ISR_CODE SEGMENT BYTE PUBLIC 'CODE'
134: PROT_ISR_CODE ENDS
135: KILL_CODE SEGMENT BYTE PUBLIC 'CODE'
136: KILL_CODE ENDS
137: DEBUG_ISR_CODE SEGMENT BYTE PUBLIC 'CODE'
138: DEBUG_ISR_CODE ENDS
139: ;
140: ; I don't think it matters where these appear
141: ;
142: REAL_ISR_DATA SEGMENT WORD PUBLIC 'ISR'
143: REAL_ISR_DATA ENDS
144: PROT_ISR_DATA SEGMENT WORD PUBLIC 'DATA'
145: PROT_ISR_DATA ENDS
146:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.