system.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Carl Eric Codere
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$define ATARI}
  13. unit {$ifdef VER1_0}sysatari{$else}{$ifdef VER0_99}sysatari{$ELSE}system{$endif}{$ENDIF};
  14. {--------------------------------------------------------------------}
  15. { LEFT TO DO: }
  16. {--------------------------------------------------------------------}
  17. { o SBrk }
  18. { o Implement truncate }
  19. { o Implement paramstr(0) }
  20. {--------------------------------------------------------------------}
  21. {$I os.inc}
  22. interface
  23. {$I systemh.inc}
  24. {$I heaph.inc}
  25. {Platform specific information}
  26. const
  27. LineEnding = #10;
  28. LFNSupport = true;
  29. DirectorySeparator = '/';
  30. DriveSeparator = ':';
  31. PathSeparator = ';';
  32. FileNameCaseSensitive = false;
  33. sLineBreak: string [1] = LineEnding;
  34. { used for single computations }
  35. const BIAS4 = $7f-1;
  36. const
  37. UnusedHandle = $ffff;
  38. StdInputHandle = 0;
  39. StdOutputHandle = 1;
  40. StdErrorHandle = $ffff;
  41. implementation
  42. {$I system.inc}
  43. {$I lowmath.inc}
  44. const
  45. argc : longint = 0;
  46. var
  47. errno : integer;
  48. {$S-}
  49. procedure Stack_Check; assembler;
  50. { Check for local variable allocation }
  51. { On Entry -> d0 : size of local stack we are trying to allocate }
  52. asm
  53. XDEF STACKCHECK
  54. move.l sp,d1 { get value of stack pointer }
  55. sub.l d0,d1 { sp - stack_size }
  56. sub.l #2048,d1
  57. cmp.l __BREAK,d1
  58. bgt @st1nosweat
  59. move.l #202,d0
  60. jsr HALT_ERROR
  61. @st1nosweat:
  62. end;
  63. Procedure Error2InOut;
  64. Begin
  65. if (errno <= -2) and (errno >= -11) then
  66. InOutRes:=150-errno { 150+errno }
  67. else
  68. Begin
  69. case errno of
  70. -32 : InOutRes:=1;
  71. -33 : InOutRes:=2;
  72. -34 : InOutRes:=3;
  73. -35 : InOutRes:=4;
  74. -36 : InOutRes:=5;
  75. -37 : InOutRes:=8;
  76. -39 : InOutRes:=8;
  77. -40 : InOutRes:=9;
  78. -46 : InOutRes:=15;
  79. -67..-64 : InOutRes:=153;
  80. -15 : InOutRes:=151;
  81. -13 : InOutRes:=150;
  82. else
  83. InOutres := word(errno);
  84. end;
  85. end;
  86. errno:=0;
  87. end;
  88. procedure halt(errnum : byte);
  89. begin
  90. do_exit;
  91. flush(stderr);
  92. asm
  93. clr.l d0
  94. move.b errnum,d0
  95. move.w d0,-(sp)
  96. move.w #$4c,-(sp)
  97. trap #1
  98. end;
  99. end;
  100. function args : pointer; assembler;
  101. asm
  102. move.l __ARGS,d0
  103. end;
  104. Function GetParamCount(const p: pchar): longint;
  105. var
  106. i: word;
  107. count: word;
  108. Begin
  109. i:=0;
  110. count:=0;
  111. while p[count] <> #0 do
  112. Begin
  113. if (p[count] <> ' ') and (p[count] <> #9) and (p[count] <> #0) then
  114. Begin
  115. i:=i+1;
  116. while (p[count] <> ' ') and (p[count] <> #9) and (p[count] <> #0) do
  117. count:=count+1;
  118. end;
  119. if p[count] = #0 then break;
  120. count:=count+1;
  121. end;
  122. GetParamCount:=longint(i);
  123. end;
  124. Function GetParam(index: word; const p : pchar): string;
  125. { On Entry: index = string index to correct parameter }
  126. { On exit: = correct character index into pchar array }
  127. { Returns correct index to command line argument }
  128. var
  129. count: word;
  130. localindex: word;
  131. l: byte;
  132. temp: string;
  133. Begin
  134. temp:='';
  135. count := 0;
  136. { first index is one }
  137. localindex := 1;
  138. l:=0;
  139. While p[count] <> #0 do
  140. Begin
  141. if (p[count] <> ' ') and (p[count] <> #9) then
  142. Begin
  143. if localindex = index then
  144. Begin
  145. while (p[count] <> #0) and (p[count] <> ' ') and (p[count] <> #9) and (l < 256) do
  146. Begin
  147. temp:=temp+p[count];
  148. l:=l+1;
  149. count:=count+1;
  150. end;
  151. temp[0]:=char(l);
  152. GetParam:=temp;
  153. exit;
  154. end;
  155. { Point to next argument in list }
  156. while (p[count] <> #0) and (p[count] <> ' ') and (p[count] <> #9) do
  157. Begin
  158. count:=count+1;
  159. end;
  160. localindex:=localindex+1;
  161. end;
  162. if p[count] = #0 then break;
  163. count:=count+1;
  164. end;
  165. GetParam:=temp;
  166. end;
  167. function paramstr(l : longint) : string;
  168. var
  169. p : pchar;
  170. s1 : string;
  171. begin
  172. if l = 0 then
  173. Begin
  174. s1 := '';
  175. end
  176. else
  177. if (l>0) and (l<=paramcount) then
  178. begin
  179. p:=args;
  180. paramstr:=GetParam(word(l),p);
  181. end
  182. else paramstr:='';
  183. end;
  184. function paramcount : longint;
  185. Begin
  186. paramcount := argc;
  187. end;
  188. procedure randomize;
  189. var
  190. hl : longint;
  191. begin
  192. asm
  193. movem.l d2/d3/a2/a3, -(sp) { save OS registers }
  194. move.w #17,-(sp)
  195. trap #14 { call xbios - random number }
  196. add.l #2,sp
  197. movem.l (sp)+,d2/d3/a2/a3
  198. move.l d0,hl { result in d0 }
  199. end;
  200. randseed:=hl;
  201. end;
  202. function getheapstart:pointer;assembler;
  203. asm
  204. lea.l HEAP,a0
  205. move.l a0,d0
  206. end;
  207. function getheapsize:longint;assembler;
  208. asm
  209. move.l HEAP_SIZE,d0
  210. end ['D0'];
  211. { This routine is used to grow the heap. }
  212. { But here we do a trick, we say that the }
  213. { heap cannot be regrown! }
  214. function sbrk( size: longint): longint;
  215. { on exit -1 = if fails. }
  216. Begin
  217. sbrk:=-1;
  218. end;
  219. {$I heap.inc}
  220. {****************************************************************************
  221. Low Level File Routines
  222. ****************************************************************************}
  223. procedure AllowSlash(p:pchar);
  224. var
  225. i : longint;
  226. begin
  227. { allow slash as backslash }
  228. for i:=0 to strlen(p) do
  229. if p[i]='/' then p[i]:='\';
  230. end;
  231. procedure do_close(h : longint);
  232. begin
  233. asm
  234. movem.l d2/d3/a2/a3,-(sp)
  235. move.l h,d0
  236. move.w d0,-(sp)
  237. move.w #$3e,-(sp)
  238. trap #1
  239. add.l #4,sp { restore stack ... }
  240. movem.l (sp)+,d2/d3/a2/a3
  241. end;
  242. end;
  243. procedure do_erase(p : pchar);
  244. begin
  245. AllowSlash(p);
  246. asm
  247. move.l d2,d6 { save d2 }
  248. movem.l d3/a2/a3,-(sp) { save regs }
  249. move.l p,-(sp)
  250. move.w #$41,-(sp)
  251. trap #1
  252. add.l #6,sp
  253. move.l d6,d2 { restore d2 }
  254. movem.l (sp)+,d3/a2/a3
  255. tst.w d0
  256. beq @doserend
  257. move.w d0,errno
  258. @doserend:
  259. end;
  260. if errno <> 0 then
  261. Error2InOut;
  262. end;
  263. procedure do_rename(p1,p2 : pchar);
  264. begin
  265. AllowSlash(p1);
  266. AllowSlash(p2);
  267. asm
  268. move.l d2,d6 { save d2 }
  269. movem.l d3/a2/a3,-(sp)
  270. move.l p1,-(sp)
  271. move.l p2,-(sp)
  272. clr.w -(sp)
  273. move.w #$56,-(sp)
  274. trap #1
  275. lea 12(sp),sp
  276. move.l d6,d2 { restore d2 }
  277. movem.l (sp)+,d3/a2/a3
  278. tst.w d0
  279. beq @dosreend
  280. move.w d0,errno { error ... }
  281. @dosreend:
  282. end;
  283. if errno <> 0 then
  284. Error2InOut;
  285. end;
  286. function do_isdevice(handle:word):boolean;
  287. begin
  288. if (handle=stdoutputhandle) or (handle=stdinputhandle) or
  289. (handle=stderrorhandle) then
  290. do_isdevice:=FALSE
  291. else
  292. do_isdevice:=TRUE;
  293. end;
  294. function do_write(h,addr,len : longint) : longint;
  295. begin
  296. asm
  297. move.l d2,d6 { save d2 }
  298. movem.l d3/a2/a3,-(sp)
  299. move.l addr,-(sp)
  300. move.l len,-(sp)
  301. move.l h,d0
  302. move.w d0,-(sp)
  303. move.w #$40,-(sp)
  304. trap #1
  305. lea 12(sp),sp
  306. move.l d6,d2 { restore d2 }
  307. movem.l (sp)+,d3/a2/a3
  308. tst.l d0
  309. bpl @doswrend
  310. move.w d0,errno { error ... }
  311. @doswrend:
  312. move.l d0,@RESULT
  313. end;
  314. if errno <> 0 then
  315. Error2InOut;
  316. end;
  317. function do_read(h,addr,len : longint) : longint;
  318. begin
  319. asm
  320. move.l d2,d6 { save d2 }
  321. movem.l d3/a2/a3,-(sp)
  322. move.l addr,-(sp)
  323. move.l len,-(sp)
  324. move.l h,d0
  325. move.w d0,-(sp)
  326. move.w #$3f,-(sp)
  327. trap #1
  328. lea 12(sp),sp
  329. move.l d6,d2 { restore d2 }
  330. movem.l (sp)+,d3/a2/a3
  331. tst.l d0
  332. bpl @dosrdend
  333. move.w d0,errno { error ... }
  334. @dosrdend:
  335. move.l d0,@Result
  336. end;
  337. if errno <> 0 then
  338. Error2InOut;
  339. end;
  340. function do_filepos(handle : longint) : longint;
  341. begin
  342. asm
  343. move.l d2,d6 { save d2 }
  344. movem.l d3/a2/a3,-(sp)
  345. move.w #1,-(sp) { seek from current position }
  346. move.l handle,d0
  347. move.w d0,-(sp)
  348. move.l #0,-(sp) { with a seek offset of zero }
  349. move.w #$42,-(sp)
  350. trap #1
  351. lea 10(sp),sp
  352. move.l d6,d2 { restore d2 }
  353. movem.l (sp)+,d3/a2/a3
  354. move.l d0,@Result
  355. end;
  356. end;
  357. procedure do_seek(handle,pos : longint);
  358. begin
  359. asm
  360. move.l d2,d6 { save d2 }
  361. movem.l d3/a2/a3,-(sp)
  362. move.w #0,-(sp) { seek from start of file }
  363. move.l handle,d0
  364. move.w d0,-(sp)
  365. move.l pos,-(sp)
  366. move.w #$42,-(sp)
  367. trap #1
  368. lea 10(sp),sp
  369. move.l d6,d2 { restore d2 }
  370. movem.l (sp)+,d3/a2/a3
  371. end;
  372. end;
  373. function do_seekend(handle:longint):longint;
  374. var
  375. t: longint;
  376. begin
  377. asm
  378. move.l d2,d6 { save d2 }
  379. movem.l d3/a2/a3,-(sp)
  380. move.w #2,-(sp) { seek from end of file }
  381. move.l handle,d0
  382. move.w d0,-(sp)
  383. move.l #0,-(sp) { with an offset of 0 from end }
  384. move.w #$42,-(sp)
  385. trap #1
  386. lea 10(sp),sp
  387. move.l d6,d2 { restore d2 }
  388. movem.l (sp)+,d3/a2/a3
  389. move.l d0,t
  390. end;
  391. do_seekend:=t;
  392. end;
  393. function do_filesize(handle : longint) : longint;
  394. var
  395. aktfilepos : longint;
  396. begin
  397. aktfilepos:=do_filepos(handle);
  398. do_filesize:=do_seekend(handle);
  399. do_seek(handle,aktfilepos);
  400. end;
  401. procedure do_truncate (handle,pos:longint);
  402. begin
  403. do_seek(handle,pos);
  404. {!!!!!!!!!!!!}
  405. end;
  406. procedure do_open(var f;p:pchar;flags:longint);
  407. {
  408. filerec and textrec have both handle and mode as the first items so
  409. they could use the same routine for opening/creating.
  410. when (flags and $100) the file will be append
  411. when (flags and $1000) the file will be truncate/rewritten
  412. when (flags and $10000) there is no check for close (needed for textfiles)
  413. }
  414. var
  415. i : word;
  416. oflags: longint;
  417. begin
  418. AllowSlash(p);
  419. { close first if opened }
  420. if ((flags and $10000)=0) then
  421. begin
  422. case filerec(f).mode of
  423. fminput,fmoutput,fminout : Do_Close(filerec(f).handle);
  424. fmclosed : ;
  425. else
  426. begin
  427. inoutres:=102; {not assigned}
  428. exit;
  429. end;
  430. end;
  431. end;
  432. { reset file handle }
  433. filerec(f).handle:=UnusedHandle;
  434. oflags:=$02; { read/write mode }
  435. { convert filemode to filerec modes }
  436. case (flags and 3) of
  437. 0 : begin
  438. filerec(f).mode:=fminput;
  439. oflags:=$00; { read mode only }
  440. end;
  441. 1 : filerec(f).mode:=fmoutput;
  442. 2 : filerec(f).mode:=fminout;
  443. end;
  444. if (flags and $1000)<>0 then
  445. begin
  446. filerec(f).mode:=fmoutput;
  447. oflags:=$04; { read/write with create }
  448. end
  449. else
  450. if (flags and $100)<>0 then
  451. begin
  452. filerec(f).mode:=fmoutput;
  453. oflags:=$02; { read/write }
  454. end;
  455. { empty name is special }
  456. if p[0]=#0 then
  457. begin
  458. case filerec(f).mode of
  459. fminput : filerec(f).handle:=StdInputHandle;
  460. fmappend,
  461. fmoutput : begin
  462. filerec(f).handle:=StdOutputHandle;
  463. filerec(f).mode:=fmoutput; {fool fmappend}
  464. end;
  465. end;
  466. exit;
  467. end;
  468. asm
  469. movem.l d2/d3/a2/a3,-(sp) { save used registers }
  470. cmp.l #4,oflags { check if rewrite mode ... }
  471. bne @opencont2
  472. { rewrite mode - create new file }
  473. move.w #0,-(sp)
  474. move.l p,-(sp)
  475. move.w #$3c,-(sp)
  476. trap #1
  477. add.l #8,sp { restore stack of os call }
  478. bra @end
  479. { reset - open existing files }
  480. @opencont2:
  481. move.l oflags,d0 { use flag as source ... }
  482. @opencont1:
  483. move.w d0,-(sp)
  484. move.l p,-(sp)
  485. move.w #$3d,-(sp)
  486. trap #1
  487. add.l #8,sp { restore stack of os call }
  488. @end:
  489. movem.l (sp)+,d2/d3/a2/a3
  490. tst.w d0
  491. bpl @opennoerr { if positive return values then ok }
  492. cmp.w #-1,d0 { if handle is -1 CON: }
  493. beq @opennoerr
  494. cmp.w #-2,d0 { if handle is -2 AUX: }
  495. beq @opennoerr
  496. cmp.w #-3,d0 { if handle is -3 PRN: }
  497. beq @opennoerr
  498. move.w d0,errno { otherwise normal error }
  499. @opennoerr:
  500. move.w d0,i { get handle as SIGNED VALUE... }
  501. end;
  502. if errno <> 0 then
  503. Error2InOut;
  504. filerec(f).handle:=i;
  505. if (flags and $100)<>0 then
  506. do_seekend(filerec(f).handle);
  507. end;
  508. {*****************************************************************************
  509. UnTyped File Handling
  510. *****************************************************************************}
  511. {$i file.inc}
  512. {*****************************************************************************
  513. Typed File Handling
  514. *****************************************************************************}
  515. {$i typefile.inc}
  516. {*****************************************************************************
  517. Text File Handling
  518. *****************************************************************************}
  519. {$i text.inc}
  520. {*****************************************************************************
  521. Directory Handling
  522. *****************************************************************************}
  523. procedure DosDir(func:byte;const s:string);
  524. var
  525. buffer : array[0..255] of char;
  526. c : word;
  527. begin
  528. move(s[1],buffer,length(s));
  529. buffer[length(s)]:=#0;
  530. AllowSlash(pchar(@buffer));
  531. c:=word(func);
  532. asm
  533. move.l d2,d6 { save d2 }
  534. movem.l d3/a2/a3,-(sp)
  535. pea buffer
  536. move.w c,-(sp)
  537. trap #1
  538. add.l #6,sp
  539. move.l d6,d2 { restore d2 }
  540. movem.l (sp)+,d3/a2/a3
  541. tst.w d0
  542. beq @dosdirend
  543. move.w d0,errno
  544. @dosdirend:
  545. end;
  546. if errno <> 0 then
  547. Error2InOut;
  548. end;
  549. procedure mkdir(const s : string);[IOCheck];
  550. begin
  551. If InOutRes <> 0 then exit;
  552. DosDir($39,s);
  553. end;
  554. procedure rmdir(const s : string);[IOCheck];
  555. begin
  556. If InOutRes <> 0 then exit;
  557. DosDir($3a,s);
  558. end;
  559. procedure chdir(const s : string);[IOCheck];
  560. begin
  561. If InOutRes <> 0 then exit;
  562. DosDir($3b,s);
  563. end;
  564. function GetDirIO (DriveNr: byte; var Dir: ShortString): word;
  565. [public, alias: 'FPC_GETDIRIO'];
  566. var
  567. temp : array[0..255] of char;
  568. i : longint;
  569. j: byte;
  570. drv: word;
  571. begin
  572. GetDirIO := 0;
  573. drv:=word(drivenr);
  574. asm
  575. move.l d2,d6 { save d2 }
  576. movem.l d3/a2/a3,-(sp)
  577. { Get dir from drivenr : 0=default, 1=A etc... }
  578. move.w drv,-(sp)
  579. { put (previously saved) offset in si }
  580. { move.l temp,-(sp)}
  581. pea temp
  582. { call attos function 47H : Get dir }
  583. move.w #$47,-(sp)
  584. { make the call }
  585. trap #1
  586. add.l #8,sp
  587. move.l d6,d2 { restore d2 }
  588. movem.l (sp)+,d3/a2/a3
  589. end;
  590. { conversion to pascal string }
  591. i:=0;
  592. while (temp[i]<>#0) do
  593. begin
  594. if temp[i]='/' then
  595. temp[i]:='\';
  596. dir[i+3]:=temp[i];
  597. inc(i);
  598. end;
  599. dir[2]:=':';
  600. dir[3]:='\';
  601. dir[0]:=char(i+2);
  602. { upcase the string (FPC Pascal function) }
  603. dir:=upcase(dir);
  604. if drivenr<>0 then { Drive was supplied. We know it }
  605. dir[1]:=chr(65+drivenr-1)
  606. else
  607. begin
  608. asm
  609. move.l d2,d6 { save d2 }
  610. movem.l d3/a2/a3,-(sp)
  611. move.w #$19,-(sp)
  612. trap #1
  613. add.l #2,sp
  614. move.w d0,drv
  615. move.l d6,d2 { restore d2 }
  616. movem.l (sp)+,d3/a2/a3
  617. end;
  618. dir[1]:=chr(byte(drv)+ord('A'));
  619. end;
  620. end;
  621. procedure GetDir (DriveNr: byte; var Dir: ShortString);
  622. begin
  623. InOutRes := GetDirIO (DriveNr, Dir);
  624. end;
  625. {*****************************************************************************
  626. System Dependent Exit code
  627. *****************************************************************************}
  628. Procedure system_exit;
  629. begin
  630. end;
  631. {*****************************************************************************
  632. SystemUnit Initialization
  633. *****************************************************************************}
  634. begin
  635. { Initialize ExitProc }
  636. ExitProc:=Nil;
  637. { to test stack depth }
  638. loweststack:=maxlongint;
  639. { Setup heap }
  640. InitHeap;
  641. { Setup stdin, stdout and stderr }
  642. OpenStdIO(Input,fmInput,StdInputHandle);
  643. OpenStdIO(Output,fmOutput,StdOutputHandle);
  644. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  645. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  646. { Reset IO Error }
  647. InOutRes:=0;
  648. errno := 0;
  649. { Setup command line arguments }
  650. argc:=GetParamCount(args);
  651. end.
  652. {
  653. $Log$
  654. Revision 1.3 2001-06-19 20:46:07 hajny
  655. * platform specific constants moved after systemh.inc, BeOS omission corrected
  656. Revision 1.2 2001/06/13 22:22:59 hajny
  657. + platform specific information
  658. Revision 1.1 2001/03/16 20:01:47 hajny
  659. + system unit name change
  660. Revision 1.2 2000/07/14 10:30:58 michael
  661. +
  662. Revision 1.1 2000/07/13 06:30:30 michael
  663. + Initial import
  664. Revision 1.14 2000/01/07 16:41:29 daniel
  665. * copyright 2000
  666. Revision 1.13 2000/01/07 16:32:23 daniel
  667. * copyright 2000 added
  668. Revision 1.12 1999/09/10 15:40:33 peter
  669. * fixed do_open flags to be > $100, becuase filemode can be upto 255
  670. Revision 1.11 1999/01/18 10:05:48 pierre
  671. + system_exit procedure added
  672. Revision 1.10 1998/12/28 15:50:43 peter
  673. + stdout, which is needed when you write something in the system unit
  674. to the screen. Like the runtime error
  675. Revision 1.9 1998/09/14 10:48:02 peter
  676. * FPC_ names
  677. * Heap manager is now system independent
  678. Revision 1.8 1998/07/15 12:11:59 carl
  679. * hmmm... can't remember! :(...
  680. Revision 1.5 1998/07/13 12:34:13 carl
  681. + Error2InoutRes implemented
  682. * do_read was doing a wrong os call!
  683. * do_open was not pushing the right values
  684. * DosDir was pushing the wrong params on the stack
  685. * do_close would never works, was pushing a longint instead of word
  686. Revision 1.4 1998/07/02 12:39:27 carl
  687. * IOCheck for mkdir,chdir and rmdir, just like in TP
  688. Revision 1.3 1998/07/01 14:40:20 carl
  689. + new stack checking implemented
  690. + IOCheck for chdir , getdir , mkdir and rmdir
  691. Revision 1.1.1.1 1998/03/25 11:18:47 root
  692. * Restored version
  693. Revision 1.8 1998/02/23 02:27:39 carl
  694. * make it link correctly
  695. Revision 1.7 1998/02/06 16:33:02 carl
  696. * oops... commited wrong file
  697. + do_open is now standard with other platforms
  698. Revision 1.5 1998/01/31 19:32:51 carl
  699. - removed incorrect $define
  700. Revision 1.4 1998/01/27 10:55:45 peter
  701. * Word Handles from -1 -> $ffff
  702. Revision 1.3 1998/01/25 22:44:14 peter
  703. * Using uniform layout
  704. }