-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBIOS_GDT.C
More file actions
222 lines (197 loc) · 5.46 KB
/
BIOS_GDT.C
File metadata and controls
222 lines (197 loc) · 5.46 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/**********************************************************************/
/* */
/* Malte System/BIOS Gadget */
/* 1992/06/30 */
/* */
/* Copyright (C) par les Chevaliers de Malte */
/* */
/**********************************************************************/
#ifndef __Malte_BIOS_Video_Text_Gadget__
#define __Malte_BIOS_Video_Text_Gadget__
#include <VIDEO\TEXT\BIOS.H>
#include <NUMERIC.H>
#include <VIDEO\BIOS_VID.H>
#include <VIDEO\CURSOR\BIOS.H>
extern struct {
Byte Shade;
Byte SpaceBorde;
TypeCadre Borde;
Word ColnDouble;
Byte Coln;
Byte Line;
Byte MaxX;
Byte MaxY;
Byte HalfMaxX;
Byte RX;
Byte RY;
Byte ColorNor;
Byte LastColor;
}
VB;
#ifdef __PASCAL__
void BIOS_WriteOP(void)
{
BIOS_WriteTyping_("\x02 (");
}
void BIOS_WriteCP(void)
{
BIOS_WriteTyping_("\x02h)");
}
void BIOS_WriteDescrLn(String Chn, Byte Sep, Word Value)
{
Byte Tmp[10];
BIOS_WriteTyping_(Chn);
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
_DecWordChn_(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteOP();
HexWordChn(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteCP();
VB.RX = 0; VB.RY++;
}
void BIOS_BiWriteDescrLn(Byte Langue, String Chn0, String Chn1, Byte Sep, Word Value)
{
if(Langue == 0) BIOS_WriteDescrLn(Chn0,Sep,Value);
else BIOS_WriteDescrLn(Chn1,Sep,Value);
}
void BIOS_WriteDescrLnB(String Chn, Byte Sep, Byte Value)
{
Byte Tmp[10];
BIOS_WriteTyping_(Chn);
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
_DecByteChn_(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteOP();
HexByteChn(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteCP();
VB.RX = 0; VB.RY++;
}
void BIOS_BiWriteDescrLnB(Byte Langue, String Chn0, String Chn1, Byte Sep, Byte Value)
{
if(Langue == 0) BIOS_WriteDescrLnB(Chn0,Sep,Value);
else BIOS_WriteDescrLnB(Chn1,Sep,Value);
}
void BIOS_WriteDescr_(String Chn, Byte Num, Byte Sep, Word Value)
{
Byte Tmp[10];
BIOS_WriteTyping_(Chn);
VB.RX += (Num-Chn[0]);
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
_DecWordChn_(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteOP();
HexWordChn(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteCP();
}
void BIOS_BiWriteDescr_(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep, Word Value)
{
if(Langue == 0) BIOS_WriteDescr_(Chn0,Num,Sep,Value);
else BIOS_WriteDescr_(Chn1,Num,Sep,Value);
}
void BIOS_WriteDescrLn_(String Chn, Byte Num, Byte Sep, Word Value)
{
BIOS_WriteDescr_(Chn,Num,Sep,Value);
VB.RX = 0; VB.RY++;
}
void BIOS_BiWriteDescrLn_(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep, Word Value)
{
if(Langue == 0) BIOS_WriteDescrLn_(Chn0,Num,Sep,Value);
else BIOS_WriteDescrLn_(Chn1,Num,Sep,Value);
}
void BIOS_WriteDescrLnH_(String Chn, Byte Num, Byte Sep, Word Value)
{
Byte Tmp[10];
BIOS_WriteTyping_(Chn);
VB.RX += (Num-Chn[0]);
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
HexWordChn(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteTypingLn("\x01h");
}
void BIOS_BiWriteDescrLnH_(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep, Word Value)
{
if(Langue == 0) BIOS_WriteDescrLnH_(Chn0,Num,Sep,Value);
else BIOS_WriteDescrLnH_(Chn1,Num,Sep,Value);
}
void BIOS_WriteDescrB_(String Chn, Byte Num, Byte Sep, Byte Value)
{
Byte Tmp[10];
BIOS_WriteTyping_(Chn);
VB.RX += (Num-Chn[0]);
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
_DecByteChn_(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteOP();
HexByteChn(Value,Tmp);
BIOS_WriteTyping_(Tmp);
BIOS_WriteCP();
}
void BIOS_BiWriteDescrB_(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep, Byte Value)
{
if(Langue == 0) BIOS_WriteDescrB_(Chn0,Num,Sep,Value);
else BIOS_WriteDescrB_(Chn1,Num,Sep,Value);
}
void BIOS_WriteDescrLnB_(String Chn, Byte Num, Byte Sep, Byte Value)
{
BIOS_WriteDescrB_(Chn,Num,Sep,Value);
VB.RX = 0; VB.RY++;
}
void BIOS_BiWriteDescrLnB_(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep, Byte Value)
{
if(Langue == 0) BIOS_WriteDescrLnB_(Chn0,Num,Sep,Value);
else BIOS_WriteDescrLnB_(Chn1,Num,Sep,Value);
}
void BIOS_BiWriteTextLn(Byte Langue, String Chn0, String Chn1)
{
if(Langue == 0) BIOS_WriteTypingLn(Chn0);
else BIOS_WriteTypingLn(Chn1);
}
void BIOS_BiWriteText(Byte Langue, String Chn0, String Chn1)
{
if(Langue == 0) BIOS_WriteTyping_(Chn0);
else BIOS_WriteTyping_(Chn1);
}
void BIOS_BiWriteDcr(Byte Langue, String Chn0, String Chn1, Byte Num, Byte Sep)
{
Byte Tmp[10];
if(Langue == 0)
{
BIOS_WriteTyping_(Chn0);
VB.RX += (Num-Chn0[0]);
}
else
{
BIOS_WriteTyping_(Chn1);
VB.RX += (Num-Chn1[0]);
}
Tmp[0] = 3;
Tmp[1] = ' ';
Tmp[2] = Sep;
Tmp[3] = ' ';
BIOS_WriteTyping_(Tmp);
}
#endif
#endif