system.inc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  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. TErrorProc (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(stderr,' 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,'Run time error ',Errorcode,' at 0x',hexstr(Longint(Erroraddr),8));
  389. dump_stack(stdout,ErrorBase);
  390. End;
  391. { call system dependent exit code }
  392. System_exit;
  393. End;
  394. Type
  395. PExitProcInfo = ^TExitProcInfo;
  396. TExitProcInfo = Record
  397. Next : PExitProcInfo;
  398. SaveExit : Pointer;
  399. Proc : TProcedure;
  400. End;
  401. const
  402. ExitProcList: PExitProcInfo = nil;
  403. Procedure DoExitProc;
  404. var
  405. P : PExitProcInfo;
  406. Proc : TProcedure;
  407. Begin
  408. P:=ExitProcList;
  409. ExitProcList:=P^.Next;
  410. ExitProc:=P^.SaveExit;
  411. Proc:=P^.Proc;
  412. DisPose(P);
  413. Proc();
  414. End;
  415. Procedure AddExitProc(Proc: TProcedure);
  416. var
  417. P : PExitProcInfo;
  418. Begin
  419. New(P);
  420. P^.Next:=ExitProcList;
  421. P^.SaveExit:=ExitProc;
  422. P^.Proc:=Proc;
  423. ExitProcList:=P;
  424. ExitProc:=@DoExitProc;
  425. End;
  426. {*****************************************************************************
  427. Abstract/Assert support.
  428. *****************************************************************************}
  429. procedure AbstractError;[public,alias : 'FPC_ABSTRACTERROR'];
  430. Type
  431. TAbstractErrorProc=Procedure;
  432. begin
  433. If AbstractErrorProc<>nil then
  434. TAbstractErrorProc(AbstractErrorProc);
  435. HandleError(211);
  436. end;
  437. Procedure int_assert(Const Msg,FName:string;LineNo,ErrorAddr:Longint); [{$ifdef HASSAVEREGISTERS}SaveRegisters,{$endif}Public,Alias : 'FPC_ASSERT'];
  438. type
  439. TAssertErrorProc=procedure(const msg,fname:string;lineno,erroraddr:longint);
  440. begin
  441. if AssertErrorProc<>nil then
  442. TAssertErrorProc(AssertErrorProc)(Msg,FName,LineNo,ErrorAddr)
  443. else
  444. HandleError(227);
  445. end;
  446. Procedure SysAssert(Const Msg,FName:string;LineNo,ErrorAddr:Longint);
  447. begin
  448. If msg='' then
  449. write(stderr,'Assertion failed')
  450. else
  451. write(stderr,msg);
  452. writeln(stderr,' (',FName,', line ',LineNo,').');
  453. end;
  454. {*****************************************************************************
  455. SetJmp/LongJmp support.
  456. *****************************************************************************}
  457. {$i setjump.inc}
  458. {*****************************************************************************
  459. Object Pascal support
  460. *****************************************************************************}
  461. {$i objpas.inc}
  462. {
  463. $Log$
  464. Revision 1.66 1999-08-05 23:45:14 peter
  465. * saveregister is now working and used for assert and iocheck (which has
  466. been moved to system.inc because it's now system independent)
  467. Revision 1.65 1999/07/28 12:58:22 peter
  468. * fixed assert() to push/pop registers
  469. Revision 1.64 1999/07/05 20:04:27 peter
  470. * removed temp defines
  471. Revision 1.63 1999/07/03 01:24:19 peter
  472. * $ifdef int64
  473. Revision 1.62 1999/07/02 18:06:42 florian
  474. + qword/int64: lo/hi/swap
  475. Revision 1.61 1999/07/01 15:39:51 florian
  476. + qword/int64 type released
  477. Revision 1.60 1999/06/11 11:47:00 peter
  478. * random doesn't rte 200 with random(0)
  479. Revision 1.59 1999/06/05 20:45:12 michael
  480. + AbstractErro should call HandleError, not runerror.
  481. Revision 1.58 1999/05/17 21:52:39 florian
  482. * most of the Object Pascal stuff moved to the system unit
  483. Revision 1.57 1999/04/17 13:10:25 peter
  484. * addr() internal
  485. Revision 1.56 1999/04/15 12:20:01 peter
  486. + finalization support
  487. Revision 1.55 1999/03/01 15:41:03 peter
  488. * use external names
  489. * removed all direct assembler modes
  490. Revision 1.54 1999/02/01 00:05:14 florian
  491. + functions lo/hi for DWord type implemented
  492. Revision 1.53 1999/01/29 09:23:09 pierre
  493. * Fillchar(..,..,boolean) added
  494. Revision 1.52 1999/01/22 12:39:23 pierre
  495. + added text arg for dump_stack
  496. Revision 1.51 1999/01/18 10:05:52 pierre
  497. + system_exit procedure added
  498. Revision 1.50 1998/12/28 15:50:46 peter
  499. + stdout, which is needed when you write something in the system unit
  500. to the screen. Like the runtime error
  501. Revision 1.49 1998/12/21 14:28:21 pierre
  502. * HandleError -> HandleErrorFrame to avoid problem in
  503. assembler code in i386.inc
  504. (call to overloaded function in assembler block !)
  505. Revision 1.48 1998/12/18 17:21:33 peter
  506. * fixed io-error handling
  507. Revision 1.47 1998/12/15 22:43:03 peter
  508. * removed temp symbols
  509. Revision 1.46 1998/12/10 23:59:56 peter
  510. * removed warnign
  511. Revision 1.45 1998/12/01 14:00:10 pierre
  512. + added conversion from exceptions into run time error
  513. (only if syswin32 compiled with -ddebug for now !)
  514. * added HandleError(errno,frame)
  515. where you specify the frame
  516. needed for win32 exception handling
  517. Revision 1.44 1998/11/26 23:16:15 jonas
  518. * changed RandSeed and OldRandSeed to Cardinal to avoid negative random numbers
  519. Revision 1.43 1998/11/17 10:36:07 michael
  520. + renamed astrings.pp to astrings.inc
  521. Revision 1.42 1998/11/16 10:21:25 peter
  522. * fixes for H+
  523. Revision 1.41 1998/11/05 10:29:36 pierre
  524. * fix for length(char) in const expressions
  525. Revision 1.40 1998/11/04 20:34:02 michael
  526. + Removed ifdef useansistrings
  527. Revision 1.39 1998/10/12 22:11:28 jonas
  528. * fixed RandSeed bug
  529. Revision 1.38 1998/10/12 12:43:37 florian
  530. * made FPC_HANDLEERROR public
  531. Revision 1.37 1998/10/07 11:40:08 jonas
  532. * changed seed2 and seed3 to cardinal to prevent overflow
  533. Revision 1.36 1998/10/05 12:32:51 peter
  534. + assert() support
  535. Revision 1.35 1998/10/02 09:25:11 peter
  536. * more constant expression evals
  537. Revision 1.34 1998/09/22 15:30:54 peter
  538. * shortstring=string type added
  539. Revision 1.33 1998/09/16 13:08:03 michael
  540. Added AbstractErrorHandler
  541. Revision 1.32 1998/09/16 12:37:07 michael
  542. Added FPC_ prefix to abstracterror
  543. Revision 1.31 1998/09/15 17:12:32 michael
  544. + Merged changes from fixes branch
  545. Revision 1.30 1998/09/14 10:48:20 peter
  546. * FPC_ names
  547. * Heap manager is now system independent
  548. Revision 1.29.2.1 1998/09/15 17:08:43 michael
  549. + Added abstracterror call
  550. Revision 1.29 1998/09/01 17:36:21 peter
  551. + internconst
  552. Revision 1.28 1998/08/17 12:24:16 carl
  553. + important comment added
  554. Revision 1.27 1998/08/13 16:22:11 jonas
  555. * random now returns a value between 0 and max-1 instead of between 0 and max
  556. Revision 1.26 1998/08/11 00:05:26 peter
  557. * $ifdef ver0_99_5 updates
  558. Revision 1.25 1998/07/30 13:26:18 michael
  559. + Added support for ErrorProc variable. All internal functions are required
  560. to call HandleError instead of runerror from now on.
  561. This is necessary for exception support.
  562. Revision 1.24 1998/07/28 20:37:45 michael
  563. + added setjmp/longjmp and exception support
  564. Revision 1.23 1998/07/23 19:53:20 michael
  565. + Adapted assert to Delphi format
  566. Revision 1.22 1998/07/23 13:08:41 michael
  567. + Implemented DO_ASSERT function.
  568. Revision 1.21 1998/07/15 12:09:35 carl
  569. * would not compile under FPC v0.99.5
  570. Revision 1.20 1998/07/13 21:19:12 florian
  571. * some problems with ansi string support fixed
  572. Revision 1.19 1998/07/08 11:56:55 carl
  573. * randon and Random(l) now work correctly - don't touch it works!
  574. Revision 1.18 1998/07/02 13:01:55 carl
  575. * hmmm... it is luck (BSS zeroed with GAS) that DoError and ErrorBase work.
  576. Now they are initilized instead.
  577. Revision 1.17 1998/07/02 12:53:09 carl
  578. * DOERROR RESOTRED! DON'T TOUCH :)
  579. Revision 1.16 1998/07/02 12:11:50 carl
  580. * no SINGLE in m68k and other processors!
  581. Revision 1.15 1998/07/02 09:25:05 peter
  582. * fixed do_error in runtimeerror
  583. Revision 1.14 1998/07/01 15:29:59 peter
  584. * better readln/writeln
  585. Revision 1.13 1998/06/26 08:21:09 daniel
  586. - Doerror removed.
  587. Revision 1.12 1998/06/25 14:04:25 peter
  588. + internal inc/dec
  589. Revision 1.11 1998/06/25 09:44:20 daniel
  590. + RTLLITE directive to compile minimal RTL.
  591. Revision 1.10 1998/06/15 15:16:26 daniel
  592. * RTLLITE conditional added to produce smaller RTL
  593. Revision 1.9 1998/06/10 07:46:45 michael
  594. + Forgot to commit some changes
  595. Revision 1.8 1998/06/08 12:38:24 michael
  596. Implemented rtti, inserted ansistrings again
  597. Revision 1.7 1998/06/04 23:46:01 peter
  598. * comp,extended are only i386 added support_comp,support_extended
  599. Revision 1.6 1998/05/20 11:23:09 cvs
  600. * test commit. Shouldn't be allowed.
  601. Revision 1.5 1998/05/12 10:42:45 peter
  602. * moved getopts to inc/, all supported OS's need argc,argv exported
  603. + strpas, strlen are now exported in the systemunit
  604. * removed logs
  605. * removed $ifdef ver_above
  606. Revision 1.4 1998/04/16 12:30:47 peter
  607. + inc(pchar), dec(pchar), incc(pchar,a),dec(pchar,a)
  608. Revision 1.3 1998/04/08 07:53:32 michael
  609. + Changed Random() function. Moved from system to processor dependent files (from Pedro Gimeno)
  610. }