forked from Reen/gnuplot
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathheader.mac
More file actions
61 lines (44 loc) · 918 Bytes
/
header.mac
File metadata and controls
61 lines (44 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
if1
LARGE equ 1 ; define your memory model here
ifdef SMALL
; default, so do nothing
else
ifdef MEDIUM
LARGE_CODE equ 1
else
ifdef COMPACT
LARGE_DATA equ 1
else
ifdef LARGE
LARGE_DATA equ 1
LARGE_CODE equ 1
else
%out No memory model defined--assuming SMALL
endif ; LARGE
endif ; COMPACT
endif ; MEDIUM
endif ; SMALL
beginproc macro procname
ifdef LARGE_CODE
procname proc far
else
procname proc near
endif ; LARGE_CODE
endm ; beginproc
endif ; if1
_TEXT SEGMENT BYTE PUBLIC 'CODE'
_TEXT ENDS
_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS
CONST SEGMENT WORD PUBLIC 'CONST'
CONST ENDS
_BSS SEGMENT WORD PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP CONST, _BSS, _DATA
assume cs:_text, ds:dgroup, ss:dgroup, es:dgroup
; define X as the offset of first argument on stack frame
ifdef LARGE_CODE
X equ 6 ; return offset and segment + old BP
else
X equ 4 ; return offset + old BP
endif ; LARGE_CODE