This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
segs.asm
109 lines (88 loc) · 2.67 KB
/
segs.asm
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
IDEAL
IFDEF DriverName
IFDEF BGI30
SEGMENT HEADER PARA PRIVATE 'HEADER'
db 'FBGD', 8, 8, 8, 8
db 'BGI Device Driver (', DriverName, ') 3.00 - ', ??date, 13, 10
db 'Copyright (c) Tomasz Kepczynski', 13, 10
db 0, 26
HeaderSize1 dw HeaderEnd@
DriverNum1 dw 0
CodeSize1 dw CodeEnd@
DriverVer1 db 3
DriverRev1 db 0
MinVer1 db 3
MinRev1 db 0
CodeSize2 dw CodeEnd@
DataSize2 dw DataEnd@
ORG 128
HeaderSize2 dw HeaderEnd@
DriverNum2 dw 0
CodeSize3 dw CodeEnd@
DriverVer2 db 3
DriverRev2 db 0
MinVer2 db 3
MinRev2 db 0
CodeSize4 dw CodeEnd@
DataSize4 dw DataEnd@
db SIZE DeviceName
DeviceName db DriverName
ORG 160
LABEL HeaderEnd@ UNKNOWN
ENDS
SEGMENT _TEXT BYTE PUBLIC 'CODE'
ENDS
SEGMENT E_TEXT PARA PUBLIC 'ECODE'
LABEL CodeEnd@ UNKNOWN
ENDS
SEGMENT _DATA PARA PUBLIC 'DATA'
ENDS
SEGMENT _BSS BYTE PUBLIC 'BSS'
ENDS
SEGMENT E_DATA BYTE PUBLIC 'EDATA'
LABEL DataEnd@ UNKNOWN
ENDS
GROUP CGROUP _TEXT, E_TEXT
GROUP DGROUP _DATA, _BSS, E_DATA
ELSE
SEGMENT HEADER PARA PRIVATE 'HEADER'
db 'pk', 8, 8
db 'BGI Device Driver (', DriverName, ') 2.00 - ', ??date, 13, 10
db 'Copyright (c) Tomasz Kepczynski', 13, 10
db 0, 26
HeaderSize1 dw HeaderEnd@
DriverNum1 dw 0
DriverSize1 dw DriverEnd@
DriverVer1 db 2
DriverRev1 db 0
MinVer1 db 1
MinRev1 db 1
ORG 128
HeaderSize2 dw HeaderEnd@
DriverNum2 dw 0
DriverSize2 dw DriverEnd@
DriverVer2 db 2
DriverRev2 db 0
MinVer2 db 1
MinRev2 db 1
db SIZE DeviceName
DeviceName db DriverName
ORG 160
LABEL HeaderEnd@ UNKNOWN
ENDS
SEGMENT _TEXT BYTE PUBLIC 'CODE'
ENDS
SEGMENT _DATA PARA PUBLIC 'DATA'
ENDS
SEGMENT _BSS BYTE PUBLIC 'BSS'
ENDS
SEGMENT E_DATA BYTE PUBLIC 'EDATA'
LABEL DriverEnd@ UNKNOWN
ENDS
GROUP DGROUP _TEXT, _DATA, _BSS, E_DATA
ENDIF
ELSE
DISPLAY "DriverName must be defined"
ERR
ENDIF
END