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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<!--
$Id: x86.xml,v 1.1 2004/10/22 20:45:36 michael Exp $
This file is part of the FPC documentation.
Copyright (C) 1997, by Michael Van Canneyt
The FPC documentation is free text; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The FPC Documentation is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the FPC documentation; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<package name="rtl">
<module name="x86">
<short>Intel X86 specific routines for unix platforms.</short>
<!-- \FPCexampledir{crtex} -->
<descr>
<p>
The <file>x86</file> unit contains some of the routines that were present in
the 1.0.X Linux unit, and which were Intel (PC) architecture specific.
</p>
<p>
These calls have been preserved for compatibility, but should be considered
deprecated: they are not portable and may not even work on future linux
versions.
</p>
</descr>
<element name="ReadPort">
<short>Read data from a PC port</short>
<descr>
<p>
<var>ReadPort</var> reads one Byte, Word or Longint from port <var>Port</var> into
<var>Value</var>.
</p>
<p>
Note that you need permission to read a port. This permission can be set by
the root user with the <link id="FpIOPerm"/> call.
</p>
</descr>
<errors>
In case of an error (not enough permissions read this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="ReadPortB"/>
<link id="ReadPortW"/>
<link id="ReadPortL"/>
<link id="WritePort"/>,
<link id="WritePortB"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
</seealso>
</element>
<element name="ReadPortB">
<short>Read bytes from a PC port</short>
<descr>
<p>
The procedural form of <var>ReadPortB</var> reads <var>Count</var> bytes from port
<var>Port</var> and stores them in <var>Buf</var>. There must be enough memory
allocated at <var>Buf</var> to store <var>Count</var> bytes.
</p>
<p>
The functional form of <var>ReadPortB</var> reads 1 byte from port <var>B</var>
and returns the byte that was read.
</p>
<p>
Note that you need permission to read a port. This permission can be set by
the root user with the <link id="FpIOPerm"/> call.
</p>
</descr>
<errors>
In case of an error (not enough permissions read this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="ReadPort"/>
<link id="ReadPortW"/>
<link id="ReadPortL"/>
<link id="WritePort"/>,
<link id="WritePortB"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
</seealso>
</element>
<element name="ReadPortL">
<short>Read longints from a PC port </short>
<descr>
<p>
The procedural form of <var>ReadPortL</var> reads <var>Count</var> longints from port
<var>Port</var> and stores them in <var>Buf</var>. There must be enough memory
allocated at <var>Buf</var> to store <var>Count</var> Longints.
</p>
<p>
The functional form of <var>ReadPortL</var> reads 1 longint from port <var>B</var>
and returns the longint that was read.
</p>
<p>
Note that you need permission to read a port. This permission can be set by
the root user with the <link id="FpIOPerm"/> call.
</p>
</descr>
<errors>
In case of an error (not enough permissions read this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="ReadPort"/>
<link id="ReadPortW"/>
<link id="ReadPortB"/>
<link id="WritePort"/>,
<link id="WritePortB"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
</seealso>
</element>
<element name="ReadPortW">
<short>Read Words from a PC port</short>
<descr>
<p>
The procedural form of <var>ReadPortW</var> reads <var>Count</var> words from port
<var>Port</var> and stores them in <var>Buf</var>. There must be enough memory
allocated at <var>Buf</var> to store <var>Count</var> words.
</p>
<p>
The functional form of <var>ReadPortW</var> reads 1 word from port <var>B</var>
and returns the word that was read.
</p>
<p>
Note that you need permission to read a port. This permission can be set by
the root user with the <link id="FpIOPerm"/> call.
</p>
</descr>
<errors>
In case of an error (not enough permissions read this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="ReadPort"/>
<link id="ReadPortB"/>
<link id="ReadPortL"/>
<link id="WritePort"/>,
<link id="WritePortB"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
</seealso>
</element>
<element name="WritePort">
<short>Write data to PC port</short>
<descr>
<p>
<var>WritePort</var> writes <var>Value</var> -- 1 byte, Word or longint --
to port <var>Port</var>.
</p>
<remark>
You need permission to write to a port. This permission can be set with root
permission with the <link id="FpIOPerm"/> call.
</remark>
</descr>
<errors>
In case of an error (not enough permissions to write to this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="WritePortB"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
<link id="ReadPortB"/>
<link id="ReadPortL"/>
<link id="ReadPortW"/>
</seealso>
</element>
<element name="WritePortB">
<short>Write byte to PC port</short>
<descr>
<p>
The first form of <var>WritePortB</var> writes 1 byte to port <var>Port</var>.
The second form writes <var>Count</var> bytes from <var>Buf</var> to port <var>Port</var>.
</p>
<remark>
You need permission to write to a port. This permission can be set with root
permission with the <link id="FpIOPerm"/> call.
</remark>
</descr>
<errors>
In case of an error (not enough permissions to write to this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="WritePort"/>
<link id="WritePortL"/>
<link id="WritePortW"/>
<link id="ReadPortB"/>
<link id="ReadPortL"/>
<link id="ReadPortW"/>
</seealso>
</element>
<element name="WritePortL">
<short>Write longint to PC port.</short>
<descr>
<p>
The first form of <var>WritePortB</var> writes 1 byte to port <var>Port</var>.
The second form writes <var>Count</var> bytes from <var>Buf</var> to port <var>Port</var>.
</p>
<remark>
You need permission to write to a port. This permission can be set with root
permission with the <link id="FpIOPerm"/> call.
</remark>
</descr>
<errors>
In case of an error (not enough permissions to write to this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="WritePort"/>
<link id="WritePortB"/>
<link id="WritePortW"/>
<link id="ReadPortB"/>
<link id="ReadPortL"/>
<link id="ReadPortW"/>
</seealso>
</element>
<element name="WritePortW">
<short>Write Word to PC port</short>
<descr>
<p>
The first form of <var>WritePortB</var> writes 1 byte to port <var>Port</var>.
The second form writes <var>Count</var> bytes from <var>Buf</var> to port <var>Port</var>.
</p>
<remark>
You need permission to write to a port. This permission can be set with root
permission with the <link id="FpIOPerm"/> call.
</remark>
</descr>
<errors>
In case of an error (not enough permissions to write to this port), runtime 216
(<em> Access Violation</em>) will occur.
</errors>
<seealso>
<link id="FpIOPerm"/>
<link id="WritePort"/>
<link id="WritePortL"/>
<link id="WritePortB"/>
<link id="ReadPortB"/>
<link id="ReadPortL"/>
<link id="ReadPortW"/>
</seealso>
</element>
<element name="FpIOperm">
<short>Set permission on IO ports</short>
<descr>
<p>
<var>FpIOperm</var>
sets permissions on <var>Num</var> ports starting with port <var>From</var> to
<var>Value</var>. The function returns zero if the call was successfull,
a nonzero value otherwise.
</p>
<p>
Note:
</p>
<ul>
<li> This works ONLY as root.</li>
<li> Only the first <var>0x03ff</var> ports can be set.</li>
<li> When doing a <link id="#rtl.baseunix.FpFork">FpFork</link>, the permissions are reset.
When doing a <link id="#rtl.baseunix.FpExecve">FpExecVE</link> they are kept.</li>
</ul>
</descr>
<errors>
Extended error information can be retrieved with <link id="#rtl.baseunix.fpGetErrno">FpGetErrno</link>
</errors>
</element>
<element name="FpIoPL">
<short>Set I/O privilege level</short>
<descr>
<var>FpIoPL</var> sets the I/O privilige level. It is intended for
completeness only, one should normally not use it.
</descr>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="BaseUnix">
<short>Basic unix calls</short>
</element>
</module>
</package>
</fpdoc-descriptions>
|