dos.tex 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. %
  2. % $Id$
  3. % This file is part of the FPC documentation.
  4. % Copyright (C) 1997, by Michael Van Canneyt
  5. %
  6. % The FPC documentation is free text; you can redistribute it and/or
  7. % modify it under the terms of the GNU Library General Public License as
  8. % published by the Free Software Foundation; either version 2 of the
  9. % License, or (at your option) any later version.
  10. %
  11. % The FPC Documentation is distributed in the hope that it will be useful,
  12. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. % Library General Public License for more details.
  15. %
  16. % You should have received a copy of the GNU Library General Public
  17. % License along with the FPC documentation; see the file COPYING.LIB. If not,
  18. % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. % Boston, MA 02111-1307, USA.
  20. %
  21. \chapter{The DOS unit.}
  22. This chapter describes the \var{DOS} unit for Free pascal, both under \dos
  23. and \linux. The unit was first written for \dos by Florian kl\"ampfl.
  24. The unit was ported to \linux by Mark May\footnote{Current
  25. e-mail address \textsf{[email protected]}}, and enhanced by Micha\"el Van
  26. Canneyt.
  27. Under \linux, some of the functionality is lost, as it is either impossible
  28. or meaningless to implement it. Other than that,
  29. the functionality for both operating systems is the same.
  30. This chapter is divided in two sections.
  31. \begin{itemize}
  32. \item The first section lists the pre-defined constants, types and variables.
  33. \item The second section describes the functions which appear in the
  34. interface part of the DOS unit.
  35. \end{itemize}
  36. \section{Types, Variables, Constants}
  37. \subsection {Constants}
  38. The DOS unit implements the following constants:
  39. \begin{verbatim}
  40. {Bitmasks for CPU Flags}
  41. fcarry = $0001;
  42. fparity = $0004;
  43. fauxiliary = $0010;
  44. fzero = $0040;
  45. fsign = $0080;
  46. foverflow = $0800;
  47. {Bitmasks for file attribute}
  48. readonly = $01;
  49. hidden = $02;
  50. sysfile = $04;
  51. volumeid = $08;
  52. directory = $10;
  53. archive = $20;
  54. anyfile = $3F;
  55. fmclosed = $D7B0;
  56. fminput = $D7B1;
  57. fmoutput = $D7B2;
  58. fminout = $D7B3;
  59. \end{verbatim}
  60. \subsection{Types}
  61. The following string types are defined for easy handling of
  62. filenames :
  63. \begin{verbatim}
  64. ComStr = String[127]; { For command-lines }
  65. PathStr = String[79]; { For full path for file names }
  66. DirStr = String[67]; { For Directory and (DOS) drive string }
  67. NameStr = String[8]; { For Name of file }
  68. ExtStr = String[4]; { For Extension of file }
  69. \end{verbatim}
  70. Under \linux, these strings all have length 255.
  71. \begin{verbatim}
  72. {$PACKRECORDS 1}
  73. SearchRec = Record
  74. Fill : array[1..21] of byte;
  75. { Fill replaced with declarations below, for Linux}
  76. Attr : Byte; {attribute of found file}
  77. Time : LongInt; {last modify date of found file}
  78. Size : LongInt; {file size of found file}
  79. Reserved : Word; {future use}
  80. Name : String[255]; {name of found file}
  81. SearchSpec: String[255]; {search pattern}
  82. NamePos: Word; {end of path, start of name position}
  83. End;
  84. \end{verbatim}
  85. Under \linux, the \var{Fill} array is replaced with the following:
  86. \begin{verbatim}
  87. SearchNum: LongInt; {to track which search this is}
  88. SearchPos: LongInt; {directory position}
  89. DirPtr: LongInt; {directory pointer for reading directory}
  90. SearchType: Byte; {0=normal, 1=open will close}
  91. SearchAttr: Byte; {attribute we are searching for}
  92. Fill: Array[1..07] of Byte; {future use}
  93. \end{verbatim}
  94. This is because the searching meachanism on Unix systems is substantially
  95. different from \dos's, and the calls have to be mimicked.
  96. \begin{verbatim}
  97. {$PACKRECORDS 2}
  98. FileRec = Record
  99. Handle : word;
  100. Mode : word;
  101. RecSize : word;
  102. _private : array[1..26] of byte;
  103. UserData: array[1..16] of byte;
  104. Name: array[0..255] of char;
  105. End;
  106. \end{verbatim}
  107. \var{FileRec} is used for internal representation of typed and untyped files.
  108. Text files are handled by the following types :
  109. \begin{verbatim}
  110. TextBuf = array[0..127] of char;
  111. TextRec = record
  112. handle : word;
  113. mode : word;
  114. bufSize : word;
  115. _private : word;
  116. bufpos : word;
  117. bufend : word;
  118. bufptr : ^textbuf;
  119. openfunc : pointer;
  120. inoutfunc : pointer;
  121. flushfunc : pointer;
  122. closefunc : pointer;
  123. userdata : array[1..16] of byte;
  124. name : array[0..127] of char;
  125. buffer : textbuf;
  126. End;
  127. \end{verbatim}
  128. The size of the \var{name} field is 255 under \linux.
  129. \begin{verbatim}
  130. Registers = record
  131. case i : integer of
  132. 0 : (ax,f1,bx,f2,cx,f3,dx,f4,bp,f5,si,
  133. f51,di,f6,ds,f7,es,f8,flags,fs,gs : word);
  134. 1 : (al,ah,f9,f10,bl,bh,f11,f12,
  135. cl,ch,f13,f14,dl,dh : byte);
  136. 2 : (eax, ebx, ecx, edx, ebp, esi, edi : longint);
  137. End;
  138. \end{verbatim}
  139. The \var{registers} type is used in the var{\var{MSDos} call.
  140. \begin{verbatim}
  141. DateTime = record
  142. Year: Word;
  143. Month: Word;
  144. Day: Word;
  145. Hour: Word;
  146. Min: Word;
  147. Sec: word;
  148. End;
  149. \end{verbatim}
  150. The \var{DateTime} type is used in \seep{PackTime} and \seep{UnPackTime} for
  151. setting/reading file times with \seep{GetFTime} and \seep{SetFTime}.
  152. \subsection{Variables}
  153. \begin{verbatim}
  154. DosError : integer;
  155. \end{verbatim}
  156. The \var{DosError} variable is used by the procedures in the \dos unit to
  157. report errors. It can have the following values :
  158. \begin{center}
  159. \begin{tabular}{cl}
  160. 2 & File not found. \\
  161. 3 & path not found. \\
  162. 5 & Access denied. \\
  163. 6 & Invalid handle. \\
  164. 8 & Not enough memory. \\
  165. 10 & Invalid environment. \\
  166. 11 & Invalid format. \\
  167. 18 & No more files.
  168. \end{tabular}
  169. \end{center}
  170. Other values are possible, but are not documented.
  171. %\begin{verbatim}
  172. % drivestr : array [0..26] of pchar;
  173. %\end{verbatim}
  174. %This variable is defined in the \linux version of the \dos unit. It is used
  175. %in the \seef{DiskFree} and \seef{DiskSize} calls.
  176. \section{Functions and Procedures}
  177. \procedure{AddDisk}{(Const S : String)}
  178. {\var{AddDisk} adds a filenme \var{S} to the internal list of filenames.
  179. This list is used to determine which disks to use in the \seef{DiskFree}
  180. and \seef{DiskSize} calls. The names are added sequentially. The dos
  181. initialization code presets the first three disks to:
  182. \begin{itemize}
  183. \item \var{'.'} for the current drive,
  184. \item \var{'/fd0/.'} for the first floppy-drive.
  185. \item \var{'/fd1/.'} for the second floppy-drive.
  186. \item \var{'/'} for the first hard disk.
  187. \end{itemize}
  188. The first call to \var{AddDisk} will therefore add a name for the second
  189. harddisk, The second call for the third drive, and so on until 23 drives
  190. have been added (corresponding to \var{'D:'} to \var{'Z:'})
  191. }{None}{\seef{DiskFree}, \seef{DiskSize} }
  192. \function{DiskFree}{(Drive: byte)}{longint}{
  193. \var{DiskFree} returns the number of free bytes on a disk. The parameter
  194. \var{Drive} indicates which disk should be checked. This parameter is 1 for
  195. floppy \var{a:}, 2 for floppy \var{b:}, etc. A value of 0 returns the free
  196. space on the current drive.
  197. Typically, the free space is the size of a disk block, multiplied by the
  198. number of free blocks on the disk.
  199. \textbf{For \linux only:}\\
  200. The \var{diskfree} and \var{disksize} functions need a file on the specified drive, since this
  201. is required for the \var{statfs} system call.
  202. These filenames are set in the initialization of the dos unit, and have
  203. been preset to :
  204. \begin{itemize}
  205. \item \var{'.'} for the current drive,
  206. \item \var{'/fd0/.'} for the first floppy-drive.
  207. \item \var{'/fd1/.'} for the second floppy-drive.
  208. \item \var{'/'} for the first hard disk.
  209. \end{itemize}
  210. There is room for 1-26 drives. You can add a drive with the
  211. \seep{AddDisk} procedure.
  212. These settings can be coded in \var{dos.pp}, in the initialization part.
  213. }{-1 when a failure occurs, or an invalid \var{drivenr} is given.}
  214. {\seef{DiskSize}}
  215. \input{dosex/ex6.tex}
  216. \function{DiskSize}{(Drive: byte)}{longint}{
  217. \var{DiskSize} returns the total size (in bytes) of a disk. The parameter
  218. \var{Drive} indicates which disk should be checked. This parameter is 1 for
  219. floppy \var{a:}, 2 for floppy \var{b:}, etc. A value of 0 returns the size
  220. of the current drive.
  221. \textbf{For \linux only:}\\
  222. The \var{diskfree} and \var{disksize} functions need a file on the specified drive, since this
  223. is required for the \var{statfs} system call.
  224. These filenames are set in the initialization of the dos unit, and have
  225. been preset to :
  226. \begin{itemize}
  227. \item \var{'.'} for the current drive,
  228. \item \var{'/fd0/.'} for the first floppy-drive.
  229. \item \var{'/fd1/.'} for the second floppy-drive.
  230. \item \var{'/'} for the first hard disk.
  231. \end{itemize}
  232. There is room for 1-26 drives. You can add a drive with the
  233. \seep{AddDisk} procedure.
  234. These settings can be coded in \var{dos.pp}, in the initialization part.
  235. }{-1 when a failure occurs, or an invalid drive number is given.}
  236. {\seef{DiskFree}}
  237. For an example, see \seef{DiskFree}.
  238. \Function{DosExitCode}{Word}{
  239. \var{DosExitCode} contains (in the low byte) the exit-code of a program
  240. executed with the \var{Exec} call.}{None.}{\seep{Exec}}
  241. \input{dosex/ex5.tex}
  242. \Function{DosVersion}{Word}
  243. {\var{DosVersion} returns the \dos version number. On \linux systems, it
  244. returns the Linux version (The first 2 numbers, e.g Linux version 2.1.76 will
  245. give you DosVersion 2.1)}{None.}{}
  246. \input{dosex/ex1.tex}
  247. \Function{EnvCount}{longint}{
  248. \var{EnvCount} returns the number of environment variables.}
  249. {None.}{\seef{EnvStr}, \seef{GetEnv}}
  250. \function{EnvStr}{(Index: integer)}{string}{
  251. \var{EnvStr} returns the \var{Index}-th \var{Name=Value} pair from the list
  252. of environment variables.
  253. The index of the first pair is zero.}
  254. {The length is limited to 255 characters. This may cause problems under
  255. \linux. The \linux unit solves this problem.}{\seef{EnvCount}, \seef{GetEnv}}
  256. \input{dosex/ex13.tex}
  257. \procedure{Exec}{(const Path: pathstr; const ComLine: comstr)}{
  258. \var{Exec} executes the program in \var{Path}, with the options given by
  259. \var{ComLine}.
  260. After the program has terminated, the procedure returns. The Exit value of
  261. the program can be consulted with the \var{DosExitCode} function.
  262. }{Errors are reported in \var{DosError}.}{\seef{DosExitCode}}
  263. For an example, see \seef{DosExitCode}
  264. \functionl{FExpand}{Dos:FExpand}{(const path: pathstr)}{pathstr}{
  265. \var{FExpand} takes its argument and expands it to a complete filename, i.e.
  266. a filename starting from the root directory of the current drive, prepended
  267. with the drive-letter (under \dos).
  268. The resulting name is converted to uppercase on \dos systems. Under \linux,
  269. the name is left as it is. (filenames are case sensitive under Unix)
  270. }{\seep{FSplit}}
  271. \input{dosex/ex5.tex}
  272. \procedure{FindClose}{(Var F: SearchRec)}{
  273. \textbf{\linux only}
  274. Under \linux, the \var{findfirst/findnext} calls have to be mimicked.
  275. An internal table of file descriptors is kept.
  276. When using different \var{searchrecs} at the same time,
  277. the system may run out of file descriptors for directories.
  278. The \linux implementation of the \dos unit therefore keeps a table of open
  279. directories, and when the table is full, closes one of the directories, and
  280. reopens another. This system is adequate but slow if you use a lot of
  281. \var{searchrecs}.
  282. So, to speed up the findfirst/findnext system, the \var{FindClose} call was
  283. implemented. When you don't need a \var{searchrec} any more, you can tell
  284. this to the \dos unit by issuing a \var{FindClose} call. The directory
  285. which is kept open for this \var{searchrec} is then closed, and the table slot
  286. freed.
  287. It is recommended to use the \linux call \var{Glob} when looking for files.
  288. }{None.}{\seef{Glob}.}
  289. \procedure{FindFirst}{(const Path: pathstr; Attr: word; var F: SearchRec)}{
  290. \var{FindFirst} searches the file specified in \var{Path}, checks the
  291. atrributes specified in \var{Attr}. It returns a \var{SearchRec} record for
  292. further searching in \var{F}.
  293. \var{Path} can contain the wildcard characters \var{?} (matches any single
  294. character) and \var{*} (matches 0 ore more arbitrary characters). In this
  295. case \var{FindFirst} will return the first file which matches the specified
  296. criteria.
  297. If \var{DosError} is different from zero, no file(s) matching the criteria
  298. was(were) found.}{Errors are reported in DosError.}{\seep{FindNext},
  299. \seep{FindClose}}
  300. \input{dosex/ex7.tex}
  301. \procedure{FindNext}{(var f: searchRec)}{
  302. \var{FindNext} takes as an argument a \var{SearchRec} from a previous
  303. \var{FindNext} call, or a \var{FindFirst} call, and tries to find another
  304. file which matches the criteria, specified in the \var{FindFirst} call.
  305. If \var{DosError} is different from zero, no more files matching the
  306. criteria were found.}{\var{DosError} is used to report errors.}
  307. {\seep{FindFirst}, \seep{FindClose}}
  308. For an example, see \seep{FindFirst}.
  309. \functionl{FSearch}{Dos:FSearch}{(Path: pathstr; DirList: string)}{pathstr}
  310. {\var{FSearch} searches the file \var{Path} in all directories listed in
  311. \var{DirList}. The full name of the found file is returned.
  312. \var{DirList} must be a list of directories, separated by semi-colons (or
  313. colons under \linux).
  314. When no file is found, an empty string is returned.
  315. }{None.}{\seefl{FExpand}{Dos:FExpand}}
  316. \input{dosex/ex10.tex}
  317. \procedure{FSplit}{(path: pathstr; \\ var dir: dirstr; var name: namestr;
  318. var ext: extstr)}{
  319. \var{FSplit} splits a full file name into 3 parts : A \var{Path}, a
  320. \var{Name} and an extension (in \var{ext}.)
  321. Under \linux, the extension is taken to be all letters after the last dot
  322. (.).
  323. }{None.}{\seefl{FSearch}{Dos:FSearch}}
  324. \input{dosex/ex12.tex}
  325. \procedure{GetCBreak}{(var breakvalue: boolean)}{
  326. \var{GetCBreak} gets the status of CTRL-Break checking under \dos.
  327. When \var{BreakValue} is \var{false}, then \dos only checks for the
  328. CTRL-Break key-press when I/O is performed. When it is set to \var{True},
  329. then a check is done at every system call.}{Under Linux, this exists but is
  330. not implemented, i.e. the call does nothing.}{\seep{SetCBreak}}
  331. \procedurel{GetDate}{Dos:GetDate}{(var year, month, mday, wday: word)}{
  332. \var{GetDate} returns the system's date. \var{Year} is a number in the range
  333. 1980..2099.\var{mday} is the day of the month,
  334. \var{wday} is the day of the week, starting with Sunday as day 0.}
  335. {None.}{\seepl{GetTime}{Dos:GetTime},\seep{SetDate}}
  336. \input{dosex/ex2.tex}
  337. \functionl{GetEnv}{Dos:GetEnv}{(EnvVar: String)}{String}{
  338. \var{Getenv} returns the value of the environment variable \var{EnvVar}.
  339. Under \linux, case is important when looking for \var{EnvVar}.
  340. When there is no environment variable \var{EnvVar} defined, an empty
  341. string is returned.}{None.}{\seef{EnvCount}, \seef{EnvStr}}
  342. \input{dosex/ex14.tex}
  343. \procedure{GetFAttr}{(var F; var Attr: word)}{
  344. \var{GetFAttr} returns the file attributes of the file-variable \var{f}.
  345. \var{F} can be a untyped or typed file, or of type \var{Text}. \var{f} must
  346. have been assigned, but not opened. The attributes can be examined with the
  347. following constants :
  348. \begin{itemize}
  349. \item \var{ReadOnly = 01h}
  350. \item \var{Hidden = 02h}
  351. \item \var{SysFile = 04h}
  352. \item \var{VolumeId = 08h}
  353. \item \var{Directory = 10h}
  354. \item \var{Archive = 20h}
  355. \item \var{AnyFile = 3fh}
  356. \end{itemize}
  357. Under \linux, supported attributes are:
  358. \begin{itemize}
  359. \item \var{Directory}
  360. \item \var{ReadOnly} if the current process doesn't have access to the file.
  361. \item \var{Hidden} for files whose name starts with a dot \var{('.')}.
  362. \end{itemize}
  363. }{Errors are reported in \var{DosError}}{\seep{SetFAttr}}
  364. \input{dosex/ex8.tex}
  365. \procedure{GetFTime}{(var F; var Time: longint)}{
  366. \var{GetFTime} returns the modification time of a file.
  367. This time is encoded and must be decoded with \var{UnPackTime}.
  368. \var{F} must be a file type, which has been assigned, but not
  369. opened.}{Errors are reported in \var{DosError}}
  370. {\seep{SetFTime}, \seep{PackTime},\seep{UnPackTime}}
  371. \input{dosex/ex9.tex}
  372. \procedure{GetIntVec}{(IntNo: byte; var Vector: pointer)}{
  373. \var{GetIntVec} returns the address of interrupt vector
  374. \var{IntNo}.}{None. Under \linux, this call exists bout isn't implemented,
  375. i.e. it does nothing.}{\seep{SetIntVec}}
  376. \procedurel{GetTime}{Dos:GetTime}{(var hour, minute, second, sec100: word)}{
  377. \var{GetTime} returns the system's time. \var{Hour} is a on a 24-hour time
  378. scale. \var{sec100} is in hundredth of a
  379. second.}{None.}{\seepl{GetDate}{Dos:GetDate},
  380. \seep{SetTime}}
  381. \input{dosex/ex3.tex}
  382. \procedure{GetVerify}{(var verify: boolean)}{
  383. \var{GetVerify} returns the status of the verify flag under \dos. When
  384. \var{Verify} is \var{True}, then \dos checks data which are written to disk,
  385. by reading them after writing. If \var{Verify} is \var{False}, then data
  386. written to disk are not verified.}{Under \linux, Verify is always
  387. \var{True}.}{\seep{SetVerify}}
  388. \procedure{Intr}{(IntNo: byte; var Regs: registers)}{
  389. \var{Intr} executes a software interrupt number \var{IntNo} (must be between
  390. 0 and 255), with processor registers set to \var{Regs}. After the interrupt call
  391. returned, the processor registers are saved in \var{Regs}.}
  392. {Under \linux this call does nothing, because interrupts are managed by the
  393. kernel. The only allowed interrupt is 80h, the kernel entry interrupt.}
  394. {\seep{MSDos}, see the \linux unit.}
  395. \procedure{Keep}{(ExitCode: word)}{
  396. \var{Keep} terminates the program, but stays in memory. This is used for TSR
  397. (Terminate Stay Resident) programs which catch some interrupt.
  398. \var{ExitCode} is the same parameter as the \var{Halt} function takes.}
  399. {Under \linux, this call does nothing.}{\seem{Halt}{}}
  400. \procedure{MSDos}{(var regs: registers)}{
  401. \var{MSDos} executes an MS-\dos call (int 21h). This is the same as doing a
  402. \var{Intr} call with an interrupt number of 21h.}{None.}{\seep{Intr}}
  403. \procedure{PackTime}{(var T: datetime; var P: longint)}{
  404. \var{UnPackTime} converts the date and time specified in \var{T}
  405. to a packed-time format which can be fed to \var{SetFTime}.}
  406. {None.}
  407. {\seep{SetFTime}, \seep{FindFirst}, \seep{FindNext}, \seep{UnPackTime}}
  408. \input{dosex/ex4.tex}
  409. \procedure{SetCBreak}{(breakvalue: boolean)}{
  410. \var{SetCBreak} sets the status of CTRL-Break checking under \dos.
  411. When \var{BreakValue} is \var{false}, then \dos only checks for the
  412. CTRL-Break key-press when I/O is performed. When it is set to \var{True},
  413. then a check is done at every system call.}{Under Linux, this call exists
  414. but is not implemented, i.e. it does nothing.}{\seep{GetCBreak}}
  415. \procedure{SetDate}{(year,month,day: word)}{
  416. \var{SetDate} sets the system's internal date. \var{Year} is a number
  417. between 1980 and 2099.}
  418. {On a \linux machine, this is not implemented (allthough a procedure
  419. exists, it just doesn't do anything. The setting of the date is a
  420. root-only privilege, and is hence not implemented.}{\seep{GetDate},
  421. \seep{SetTime}}
  422. \procedure{SetFAttr}{(var F; Attr: word)}{
  423. \var{SetFAttr} sets the file attributes of the file-variable \var{F}.
  424. \var{F} can be a untyped or typed file, or of type \var{Text}. \var{F} must
  425. have been assigned, but not opened. The attributes can be a sum of the
  426. following constants:
  427. \begin{itemize}
  428. \item \var{ReadOnly = 01h}
  429. \item \var{Hidden = 02h}
  430. \item \var{SysFile = 04h}
  431. \item \var{VolumeId = 08h}
  432. \item \var{Directory = 10h}
  433. \item \var{Archive = 20h}
  434. \item \var{AnyFile = 3fh}
  435. \end{itemize}
  436. }{Errors are reported in \var{DosError}.
  437. Under \linux the call exists, but is not implemented, i.e. it does nothing.}
  438. {\seep{GetFAttr}}
  439. \procedure{SetFTime}{(var F; Time: longint)}{
  440. \var{GetFTime} returns the modification time of a file,
  441. this time is encoded and must be encoded with \var{PackTime}.
  442. \var{F} must be a file type, which has been assigned, but not
  443. opened.}{Errors are reported in \var{DosError}}
  444. {\seep{GetFTime}, \seep{PackTime},\seep{UnPackTime}}
  445. \procedure{SetIntVec}{(IntNo: byte; Vector: pointer)}{
  446. \var{SetIntVec} sets interrupt vector \var{IntNo} to \var{Vector}.
  447. \var{Vector} should point to an interrupt procedure.}{Under \linux, this
  448. call exists but is not implemented, the kernel manages all interrupts.}
  449. {\seep{GetIntVec}}
  450. \procedure{SetTime}{(hour,minute,second,sec100: word)}{
  451. \var{SetTime} sets the system's internal clock. The \var{Hour} parameter is
  452. on a 24-hour time scale.}{this call exists, but is not implemented on \linux,
  453. as setting the time is a root-only privilege.}
  454. {\seep{GetTime}, \seep{SetDate}}
  455. \procedure{SetVerify}{(verify: boolean)}{
  456. \var{SetVerify} sets the status of the verify flag under \dos. When
  457. \var{Verify} is \var{True}, then \dos checks data which are written to disk,
  458. by reading them after writing. If \var{Verify} is \var{False}, then data
  459. written to disk are not verified.}{Under \linux, Verify is always
  460. \var{True}.}{\seep{SetVerify}}
  461. \Procedure{SwapVectors}{
  462. \var{SwapVectors} swaps the contents of the internal table of interrupt
  463. vectors with the current contents of the interrupt vectors.
  464. This is called typically in before and after an \var{Exec} call.
  465. }{Under \linux this call does nothing, as the interrupt vectors are
  466. managed by the kernel.}{\seep{Exec}, \seep{SetIntVec}}
  467. \procedure{UnPackTime}{(p: longint; var T: datetime)}{
  468. \var{UnPackTime} converts the file-modification time in \var{p}
  469. to a \var{DateTime} record. The file-modification time can be
  470. returned by \var{GetFTime}, \var{FindFirst} or \var{FindNext} calls.}
  471. {None.}
  472. {\seep{GetFTime}, \seep{FindFirst}, \seep{FindNext}, \seep{PackTime}}
  473. For an example, see \seep{PackTime}.