system.inc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Run time library.
  4. Copyright (c) 1993,97 by the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. For details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {****************************************************************************
  12. Local types
  13. ****************************************************************************}
  14. {
  15. TextRec and FileRec are put in a separate file to make it available to other
  16. units without putting it explicitly in systemh.
  17. This way we keep TP compatibility, and the TextRec definition is available
  18. for everyone who needs it.
  19. }
  20. {$i filerec.inc}
  21. {$i textrec.inc}
  22. Procedure HandleError (Errno : Longint); forward;
  23. Procedure HandleErrorFrame (Errno : longint;frame : longint); forward;
  24. type
  25. FileFunc = Procedure(var t : TextRec);
  26. PLongint = ^Longint;
  27. PByte = ^Byte;
  28. const
  29. { Random / Randomize constants }
  30. OldRandSeed : Cardinal = 0;
  31. InitialSeed : Boolean = TRUE;
  32. Seed2 : Cardinal = 0;
  33. Seed3 : Cardinal = 0;
  34. { For Error Handling.}
  35. ErrorBase : Longint = 0;
  36. { Used by the ansistrings and maybe also other things in the future }
  37. var
  38. emptychar : char;public name 'FPC_EMPTYCHAR';
  39. {****************************************************************************
  40. Routines which have compiler magic
  41. ****************************************************************************}
  42. {$I innr.inc}
  43. Function lo(i : Integer) : byte; [INTERNPROC: In_lo_Word];
  44. Function lo(w : Word) : byte; [INTERNPROC: In_lo_Word];
  45. Function lo(l : Longint) : Word; [INTERNPROC: In_lo_long];
  46. Function lo(l : DWord) : Word; [INTERNPROC: In_lo_long];
  47. Function hi(i : Integer) : byte; [INTERNPROC: In_hi_Word];
  48. Function hi(w : Word) : byte; [INTERNPROC: In_hi_Word];
  49. Function hi(l : Longint) : Word; [INTERNPROC: In_hi_long];
  50. Function hi(l : DWord) : Word; [INTERNPROC: In_hi_long];
  51. {$ifdef INT64}
  52. Function lo(q : QWord) : DWord; [INTERNPROC: In_lo_qword];
  53. Function lo(i : Int64) : DWord; [INTERNPROC: In_lo_qword];
  54. Function hi(q : QWord) : DWord; [INTERNPROC: In_hi_qword];
  55. Function hi(i : Int64) : DWord; [INTERNPROC: In_hi_qword];
  56. {$endif}
  57. Function chr(b : byte) : Char; [INTERNPROC: In_chr_byte];
  58. Function Length(s : string) : byte; [INTERNPROC: In_Length_string];
  59. Function Length(c : char) : byte; [INTERNPROC: In_Length_string];
  60. Procedure Reset(var f : TypedFile); [INTERNPROC: In_Reset_TypedFile];
  61. Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
  62. {****************************************************************************
  63. Include processor specific routines
  64. ****************************************************************************}
  65. {$IFDEF I386}
  66. {$IFDEF M68K}
  67. {$Error Can't determine processor type !}
  68. {$ENDIF}
  69. {$I i386.inc} { Case dependent, don't change }
  70. {$ELSE}
  71. {$IFDEF M68K}
  72. {$I m68k.inc} { Case dependent, don't change }
  73. {$ELSE}
  74. {$Error Can't determine processor type !}
  75. {$ENDIF}
  76. {$ENDIF}
  77. {****************************************************************************
  78. Set Handling
  79. ****************************************************************************}
  80. { Include set support which is processor specific}
  81. {$I set.inc}
  82. {****************************************************************************
  83. Subroutines for String handling
  84. ****************************************************************************}
  85. { Needs to be before RTTI handling }
  86. {$i sstrings.inc}
  87. {$i astrings.inc}
  88. {****************************************************************************
  89. Run-Time Type Information (RTTI)
  90. ****************************************************************************}
  91. {$i rtti.inc}
  92. {****************************************************************************
  93. Math Routines
  94. ****************************************************************************}
  95. {$ifndef RTLLITE}
  96. function Hi(b : byte): byte;
  97. begin
  98. Hi := b shr 4
  99. end;
  100. function Lo(b : byte): byte;
  101. begin
  102. Lo := b and $0f
  103. end;
  104. Function swap (X : Word) : Word;[internconst:in_const_swap_word];
  105. Begin
  106. swap:=(X and $ff) shl 8 + (X shr 8)
  107. End;
  108. Function Swap (X : Integer) : Integer;[internconst:in_const_swap_word];
  109. Begin
  110. swap:=(X and $ff) shl 8 + (X shr 8)
  111. End;
  112. Function swap (X : Longint) : Longint;[internconst:in_const_swap_long];
  113. Begin
  114. Swap:=(X and $ffff) shl 16 + (X shr 16)
  115. End;
  116. Function Swap (X : Cardinal) : Cardinal;[internconst:in_const_swap_long];
  117. Begin
  118. Swap:=(X and $ffff) shl 16 + (X shr 16)
  119. End;
  120. {$ifdef INT64}
  121. Function Swap (X : QWord) : QWord;
  122. Begin
  123. Swap:=(X and $ffffffff) shl 32 + (X shr 32);
  124. End;
  125. Function swap (X : Int64) : Int64;
  126. Begin
  127. Swap:=(X and $ffffffff) shl 32 + (X shr 32);
  128. End;
  129. {$endif}
  130. {$endif RTLLITE}
  131. {****************************************************************************
  132. Random function routines
  133. This implements a very long cycle random number generator by combining
  134. three independant generators. The technique was described in the March
  135. 1987 issue of Byte.
  136. Taken and modified with permission from the PCQ Pascal rtl code.
  137. ****************************************************************************}
  138. {$R-}
  139. {$Q-}
  140. Procedure UseSeed(seed : Longint);Forward;
  141. Function Random : Real;
  142. var
  143. ReturnValue : Real;
  144. begin
  145. if (InitialSeed) OR ((RandSeed <> OldRandSeed) AND (NOT InitialSeed)) then
  146. Begin
  147. { This is a pretty complicated affair }
  148. { Initially we must call UseSeed when RandSeed is initalized }
  149. { We must also call UseSeed each time RandSeed is reinitialized }
  150. { DO NOT CHANGE THE ORDER OF DECLARATIONS IN THIS BLOCK }
  151. { UNLESS YOU WANT RANDON TO CRASH OF COURSE (CEC) }
  152. InitialSeed:=FALSE;
  153. OldRandSeed:=RandSeed;
  154. UseSeed(RandSeed);
  155. end;
  156. Inc(RandSeed);
  157. RandSeed := (RandSeed * 706) mod 500009;
  158. OldRandSeed:=RandSeed;
  159. INC(Seed2);
  160. Seed2 := (Seed2 * 774) MOD 600011;
  161. INC(Seed3);
  162. Seed3 := (Seed3 * 871) MOD 765241;
  163. ReturnValue := RandSeed/500009.0 +
  164. Seed2/600011.0 +
  165. Seed3/765241.0;
  166. Random := frac(ReturnValue);
  167. end;
  168. Function Random(l : Longint) : Longint;
  169. begin
  170. if (InitialSeed) OR ((RandSeed <> OldRandSeed) AND (NOT InitialSeed)) then
  171. Begin
  172. { This is a pretty complicated affair }
  173. { Initially we must call UseSeed when RandSeed is initalized }
  174. { We must also call UseSeed each time RandSeed is reinitialized }
  175. { DO NOT CHANGE THE ORDER OF DECLARATIONS IN THIS BLOCK }
  176. { UNLESS YOU WANT RANDON TO CRASH OF COURSE (CEC) }
  177. InitialSeed:=FALSE;
  178. OldRandSeed:=RandSeed;
  179. UseSeed(Randseed);
  180. end;
  181. Inc(RandSeed);
  182. RandSeed := (RandSeed * 998) mod 1000003;
  183. OldRandSeed:=RandSeed;
  184. if l=0 then
  185. Random:=0
  186. else
  187. Random := RandSeed mod l;
  188. end;
  189. Procedure UseSeed(seed : Longint);
  190. begin
  191. randseed := seed mod 1000003;
  192. Seed2 := (Random(65000) * Random(65000)) mod 600011;
  193. Seed3 := (Random(65000) * Random(65000)) mod 765241;
  194. end;
  195. { Include processor specific routines }
  196. {$I math.inc}
  197. {$ifdef INT64}
  198. {$I int64.inc}
  199. {$endif INT64}
  200. {****************************************************************************
  201. Memory Management
  202. ****************************************************************************}
  203. {$ifndef RTLLITE}
  204. Function Ptr(sel,off : Longint) : pointer;[internconst:in_const_ptr];
  205. Begin
  206. sel:=0;
  207. ptr:=pointer(off);
  208. End;
  209. Function CSeg : Word;
  210. Begin
  211. Cseg:=0;
  212. End;
  213. Function DSeg : Word;
  214. Begin
  215. Dseg:=0;
  216. End;
  217. Function SSeg : Word;
  218. Begin
  219. Sseg:=0;
  220. End;
  221. {$endif RTLLITE}
  222. {*****************************************************************************
  223. Directory support.
  224. *****************************************************************************}
  225. Procedure getdir(drivenr:byte;Var dir:ansistring);
  226. { this is needed to also allow ansistrings, the shortstring version is
  227. OS dependent }
  228. var
  229. s : shortstring;
  230. begin
  231. getdir(drivenr,s);
  232. dir:=s;
  233. end;
  234. {*****************************************************************************
  235. Miscellaneous
  236. *****************************************************************************}
  237. procedure int_overflow;[public,alias:'FPC_OVERFLOW'];
  238. begin
  239. HandleErrorFrame(215,get_frame);
  240. end;
  241. {$ifdef HASSAVEREGISTERS}
  242. procedure int_iocheck(addr : longint);[saveregisters,public,alias:'FPC_IOCHECK'];
  243. var
  244. l : longint;
  245. begin
  246. if InOutRes<>0 then
  247. begin
  248. l:=InOutRes;
  249. InOutRes:=0;
  250. HandleErrorFrame(l,get_frame);
  251. end;
  252. end;
  253. {$endif}
  254. Function IOResult:Word;
  255. Begin
  256. IOResult:=InOutRes;
  257. InOutRes:=0;
  258. End;
  259. procedure fillchar(var x;count : longint;value : boolean);
  260. begin
  261. fillchar(x,count,byte(value));
  262. end;
  263. procedure fillchar(var x;count : longint;value : char);
  264. begin
  265. fillchar(x,count,byte(value));
  266. end;
  267. {*****************************************************************************
  268. Initialization / Finalization
  269. *****************************************************************************}
  270. const
  271. maxunits=1024; { See also files.pas of the compiler source }
  272. type
  273. TInitFinalRec=record
  274. InitProc,
  275. FinalProc : TProcedure;
  276. end;
  277. TInitFinalTable=record
  278. TableCount,
  279. InitCount : longint;
  280. Procs : array[1..maxunits] of TInitFinalRec;
  281. end;
  282. var
  283. InitFinalTable : TInitFinalTable;external name 'INITFINAL';
  284. procedure InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS'];
  285. var
  286. i : longint;
  287. begin
  288. with InitFinalTable do
  289. begin
  290. for i:=1to TableCount do
  291. begin
  292. if assigned(Procs[i].InitProc) then
  293. Procs[i].InitProc();
  294. InitCount:=i;
  295. end;
  296. end;
  297. end;
  298. procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
  299. begin
  300. with InitFinalTable do
  301. begin
  302. while (InitCount>0) do
  303. begin
  304. if assigned(Procs[InitCount].FinalProc) then
  305. Procs[InitCount].FinalProc();
  306. dec(InitCount);
  307. end;
  308. end;
  309. end;
  310. {*****************************************************************************
  311. Error / Exit / ExitProc
  312. *****************************************************************************}
  313. Procedure HandleErrorFrame (Errno : longint;frame : longint);
  314. {
  315. Procedure to handle internal errors, i.e. not user-invoked errors
  316. Internal function should ALWAYS call HandleError instead of RunError.
  317. Can be used for exception handlers to specify the frame
  318. }
  319. var
  320. addr : longint;
  321. begin
  322. addr:=get_caller_addr(frame);
  323. If ErrorProc<>Nil then
  324. ErrorProc(Errno,pointer(addr));
  325. errorcode:=Errno;
  326. exitcode:=Errno;
  327. erroraddr:=pointer(addr);
  328. errorbase:=get_caller_frame(frame);
  329. halt(errorcode);
  330. end;
  331. Procedure HandleError (Errno : longint);[public,alias : 'FPC_HANDLEERROR'];
  332. {
  333. Procedure to handle internal errors, i.e. not user-invoked errors
  334. Internal function should ALWAYS call HandleError instead of RunError.
  335. }
  336. begin
  337. HandleErrorFrame(Errno,get_frame);
  338. end;
  339. procedure runerror(w : word);[alias: 'FPC_RUNERROR'];
  340. begin
  341. errorcode:=w;
  342. exitcode:=w;
  343. erroraddr:=pointer(get_caller_addr(get_frame));
  344. errorbase:=get_caller_frame(get_frame);
  345. halt(errorcode);
  346. end;
  347. Procedure RunError;
  348. Begin
  349. RunError (0);
  350. End;
  351. Procedure Halt;
  352. Begin
  353. Halt(0);
  354. End;
  355. Procedure dump_stack(var f : text;bp : Longint);
  356. var
  357. i, prevbp : Longint;
  358. Begin
  359. prevbp:=bp-1;
  360. i:=0;
  361. while bp > prevbp Do
  362. Begin
  363. Writeln(f,' 0x',HexStr(get_caller_addr(bp),8));
  364. Inc(i);
  365. If i>max_frame_dump Then
  366. exit;
  367. prevbp:=bp;
  368. bp:=get_caller_frame(bp);
  369. End;
  370. End;
  371. Procedure system_exit;forward;
  372. Procedure do_exit;[Public,Alias:'FPC_DO_EXIT'];
  373. var
  374. current_exit : Procedure;
  375. Begin
  376. while exitProc<>nil Do
  377. Begin
  378. InOutRes:=0;
  379. current_exit:=tProcedure(exitProc);
  380. exitProc:=nil;
  381. current_exit();
  382. End;
  383. { Finalize units }
  384. FinalizeUnits;
  385. { Show runtime error }
  386. If erroraddr<>nil Then
  387. Begin
  388. Writeln(stdout,'Runtime error ',Errorcode,' at 0x',hexstr(Longint(Erroraddr),8));
  389. dump_stack(stdout,ErrorBase);
  390. Writeln(stdout,'');
  391. End;
  392. { call system dependent exit code }
  393. System_exit;
  394. End;
  395. Type
  396. PExitProcInfo = ^TExitProcInfo;
  397. TExitProcInfo = Record
  398. Next : PExitProcInfo;
  399. SaveExit : Pointer;
  400. Proc : TProcedure;
  401. End;
  402. const
  403. ExitProcList: PExitProcInfo = nil;
  404. Procedure DoExitProc;
  405. var
  406. P : PExitProcInfo;
  407. Proc : TProcedure;
  408. Begin
  409. P:=ExitProcList;
  410. ExitProcList:=P^.Next;
  411. ExitProc:=P^.SaveExit;
  412. Proc:=P^.Proc;
  413. DisPose(P);
  414. Proc();
  415. End;
  416. Procedure AddExitProc(Proc: TProcedure);
  417. var
  418. P : PExitProcInfo;
  419. Begin
  420. New(P);
  421. P^.Next:=ExitProcList;
  422. P^.SaveExit:=ExitProc;
  423. P^.Proc:=Proc;
  424. ExitProcList:=P;
  425. ExitProc:=@DoExitProc;
  426. End;
  427. {*****************************************************************************
  428. Abstract/Assert support.
  429. *****************************************************************************}
  430. procedure AbstractError;[public,alias : 'FPC_ABSTRACTERROR'];
  431. begin
  432. If AbstractErrorProc<>nil then
  433. AbstractErrorProc();
  434. HandleError(211);
  435. end;
  436. Procedure int_assert(Const Msg,FName:Shortstring;LineNo,ErrorAddr:Longint); [{$ifdef HASSAVEREGISTERS}SaveRegisters,{$endif}Public,Alias : 'FPC_ASSERT'];
  437. begin
  438. if AssertErrorProc<>nil then
  439. AssertErrorProc(Msg,FName,LineNo,ErrorAddr)
  440. else
  441. HandleError(227);
  442. end;
  443. Procedure SysAssert(Const Msg,FName:Shortstring;LineNo,ErrorAddr:Longint);
  444. begin
  445. If msg='' then
  446. write(stderr,'Assertion failed')
  447. else
  448. write(stderr,msg);
  449. Writeln(stderr,' (',FName,', line ',LineNo,').');
  450. Writeln(stderr,'');
  451. end;
  452. {*****************************************************************************
  453. SetJmp/LongJmp support.
  454. *****************************************************************************}
  455. {$i setjump.inc}
  456. {*****************************************************************************
  457. Object Pascal support
  458. *****************************************************************************}
  459. {$i objpas.inc}
  460. {
  461. $Log$
  462. Revision 1.68 1999-10-26 12:31:00 peter
  463. * *errorproc are not procvars instead of pointers which allows better
  464. error checking for the parameters (shortstring<->ansistring)
  465. Revision 1.67 1999/09/18 16:05:12 jonas
  466. * dump_stack now actually dumps its info to f (was still hardcoded
  467. to stderr)
  468. Revision 1.66 1999/08/05 23:45:14 peter
  469. * saveregister is now working and used for assert and iocheck (which has
  470. been moved to system.inc because it's now system independent)
  471. Revision 1.65 1999/07/28 12:58:22 peter
  472. * fixed assert() to push/pop registers
  473. Revision 1.64 1999/07/05 20:04:27 peter
  474. * removed temp defines
  475. Revision 1.63 1999/07/03 01:24:19 peter
  476. * $ifdef int64
  477. Revision 1.62 1999/07/02 18:06:42 florian
  478. + qword/int64: lo/hi/swap
  479. Revision 1.61 1999/07/01 15:39:51 florian
  480. + qword/int64 type released
  481. Revision 1.60 1999/06/11 11:47:00 peter
  482. * random doesn't rte 200 with random(0)
  483. Revision 1.59 1999/06/05 20:45:12 michael
  484. + AbstractErro should call HandleError, not runerror.
  485. Revision 1.58 1999/05/17 21:52:39 florian
  486. * most of the Object Pascal stuff moved to the system unit
  487. Revision 1.57 1999/04/17 13:10:25 peter
  488. * addr() internal
  489. Revision 1.56 1999/04/15 12:20:01 peter
  490. + finalization support
  491. Revision 1.55 1999/03/01 15:41:03 peter
  492. * use external names
  493. * removed all direct assembler modes
  494. Revision 1.54 1999/02/01 00:05:14 florian
  495. + functions lo/hi for DWord type implemented
  496. Revision 1.53 1999/01/29 09:23:09 pierre
  497. * Fillchar(..,..,boolean) added
  498. Revision 1.52 1999/01/22 12:39:23 pierre
  499. + added text arg for dump_stack
  500. Revision 1.51 1999/01/18 10:05:52 pierre
  501. + system_exit procedure added
  502. Revision 1.50 1998/12/28 15:50:46 peter
  503. + stdout, which is needed when you write something in the system unit
  504. to the screen. Like the runtime error
  505. Revision 1.49 1998/12/21 14:28:21 pierre
  506. * HandleError -> HandleErrorFrame to avoid problem in
  507. assembler code in i386.inc
  508. (call to overloaded function in assembler block !)
  509. Revision 1.48 1998/12/18 17:21:33 peter
  510. * fixed io-error handling
  511. Revision 1.47 1998/12/15 22:43:03 peter
  512. * removed temp symbols
  513. Revision 1.46 1998/12/10 23:59:56 peter
  514. * removed warnign
  515. Revision 1.45 1998/12/01 14:00:10 pierre
  516. + added conversion from exceptions into run time error
  517. (only if syswin32 compiled with -ddebug for now !)
  518. * added HandleError(errno,frame)
  519. where you specify the frame
  520. needed for win32 exception handling
  521. Revision 1.44 1998/11/26 23:16:15 jonas
  522. * changed RandSeed and OldRandSeed to Cardinal to avoid negative random numbers
  523. Revision 1.43 1998/11/17 10:36:07 michael
  524. + renamed astrings.pp to astrings.inc
  525. Revision 1.42 1998/11/16 10:21:25 peter
  526. * fixes for H+
  527. Revision 1.41 1998/11/05 10:29:36 pierre
  528. * fix for length(char) in const expressions
  529. Revision 1.40 1998/11/04 20:34:02 michael
  530. + Removed ifdef useansistrings
  531. Revision 1.39 1998/10/12 22:11:28 jonas
  532. * fixed RandSeed bug
  533. Revision 1.38 1998/10/12 12:43:37 florian
  534. * made FPC_HANDLEERROR public
  535. Revision 1.37 1998/10/07 11:40:08 jonas
  536. * changed seed2 and seed3 to cardinal to prevent overflow
  537. Revision 1.36 1998/10/05 12:32:51 peter
  538. + assert() support
  539. Revision 1.35 1998/10/02 09:25:11 peter
  540. * more constant expression evals
  541. Revision 1.34 1998/09/22 15:30:54 peter
  542. * shortstring=string type added
  543. Revision 1.33 1998/09/16 13:08:03 michael
  544. Added AbstractErrorHandler
  545. Revision 1.32 1998/09/16 12:37:07 michael
  546. Added FPC_ prefix to abstracterror
  547. Revision 1.31 1998/09/15 17:12:32 michael
  548. + Merged changes from fixes branch
  549. Revision 1.30 1998/09/14 10:48:20 peter
  550. * FPC_ names
  551. * Heap manager is now system independent
  552. Revision 1.29.2.1 1998/09/15 17:08:43 michael
  553. + Added abstracterror call
  554. Revision 1.29 1998/09/01 17:36:21 peter
  555. + internconst
  556. Revision 1.28 1998/08/17 12:24:16 carl
  557. + important comment added
  558. Revision 1.27 1998/08/13 16:22:11 jonas
  559. * random now returns a value between 0 and max-1 instead of between 0 and max
  560. Revision 1.26 1998/08/11 00:05:26 peter
  561. * $ifdef ver0_99_5 updates
  562. Revision 1.25 1998/07/30 13:26:18 michael
  563. + Added support for ErrorProc variable. All internal functions are required
  564. to call HandleError instead of runerror from now on.
  565. This is necessary for exception support.
  566. Revision 1.24 1998/07/28 20:37:45 michael
  567. + added setjmp/longjmp and exception support
  568. Revision 1.23 1998/07/23 19:53:20 michael
  569. + Adapted assert to Delphi format
  570. Revision 1.22 1998/07/23 13:08:41 michael
  571. + Implemented DO_ASSERT function.
  572. Revision 1.21 1998/07/15 12:09:35 carl
  573. * would not compile under FPC v0.99.5
  574. Revision 1.20 1998/07/13 21:19:12 florian
  575. * some problems with ansi string support fixed
  576. Revision 1.19 1998/07/08 11:56:55 carl
  577. * randon and Random(l) now work correctly - don't touch it works!
  578. Revision 1.18 1998/07/02 13:01:55 carl
  579. * hmmm... it is luck (BSS zeroed with GAS) that DoError and ErrorBase work.
  580. Now they are initilized instead.
  581. Revision 1.17 1998/07/02 12:53:09 carl
  582. * DOERROR RESOTRED! DON'T TOUCH :)
  583. Revision 1.16 1998/07/02 12:11:50 carl
  584. * no SINGLE in m68k and other processors!
  585. Revision 1.15 1998/07/02 09:25:05 peter
  586. * fixed do_error in runtimeerror
  587. Revision 1.14 1998/07/01 15:29:59 peter
  588. * better readln/writeln
  589. Revision 1.13 1998/06/26 08:21:09 daniel
  590. - Doerror removed.
  591. Revision 1.12 1998/06/25 14:04:25 peter
  592. + internal inc/dec
  593. Revision 1.11 1998/06/25 09:44:20 daniel
  594. + RTLLITE directive to compile minimal RTL.
  595. Revision 1.10 1998/06/15 15:16:26 daniel
  596. * RTLLITE conditional added to produce smaller RTL
  597. Revision 1.9 1998/06/10 07:46:45 michael
  598. + Forgot to commit some changes
  599. Revision 1.8 1998/06/08 12:38:24 michael
  600. Implemented rtti, inserted ansistrings again
  601. Revision 1.7 1998/06/04 23:46:01 peter
  602. * comp,extended are only i386 added support_comp,support_extended
  603. Revision 1.6 1998/05/20 11:23:09 cvs
  604. * test commit. Shouldn't be allowed.
  605. Revision 1.5 1998/05/12 10:42:45 peter
  606. * moved getopts to inc/, all supported OS's need argc,argv exported
  607. + strpas, strlen are now exported in the systemunit
  608. * removed logs
  609. * removed $ifdef ver_above
  610. Revision 1.4 1998/04/16 12:30:47 peter
  611. + inc(pchar), dec(pchar), incc(pchar,a),dec(pchar,a)
  612. Revision 1.3 1998/04/08 07:53:32 michael
  613. + Changed Random() function. Moved from system to processor dependent files (from Pedro Gimeno)
  614. }