systems.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. {
  2. $Id$
  3. Copyright (C) 1998-2000 by Florian Klaempfl
  4. This unit contains information about the target systems supported
  5. (these are not processor specific)
  6. This program is free software; you can redistribute it and/or modify
  7. iu under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit systems;
  20. {$i defines.inc}
  21. interface
  22. type
  23. tendian = (endian_little,endian_big);
  24. {
  25. IMPORTANT NOTE:
  26. The value of this enumeration is stored in PPU files.
  27. Therefore adding new CPU targets should not change the
  28. values of the pre-existing targets. (CEC)
  29. FURTHERMORE : Make sure that this branch values, are
  30. consistant with the main branch version always.
  31. }
  32. ttargetcpu=
  33. (
  34. cpu_no, { 0 }
  35. cpu_i386, { 1 }
  36. cpu_m68k, { 2 }
  37. cpu_alpha, { 3 }
  38. cpu_powerpc, { 4 }
  39. cpu_sparc, { 5 }
  40. cpu_vm { 6 }
  41. );
  42. tprocessors = (no_processor
  43. ,Class386,ClassP5,ClassP6
  44. ,MC68000,MC68100,MC68020
  45. );
  46. tsection=(sec_none,
  47. sec_code,sec_data,sec_bss,
  48. sec_idata2,sec_idata4,sec_idata5,sec_idata6,sec_idata7,sec_edata,
  49. sec_stab,sec_stabstr
  50. );
  51. tasmmode= (asmmode_none
  52. ,asmmode_i386_direct,asmmode_i386_att,asmmode_i386_intel
  53. ,asmmode_m68k_mot
  54. ,asmmode_alpha_direct
  55. ,asmmode_powerpc_direct
  56. );
  57. { IMPORTANT NOTE:
  58. the integer value of this enum is stored in PPU
  59. files to recognize the target, so if you add new targets
  60. allways add them at end PM
  61. FURTHERMORE : Make sure that this branch values, are
  62. consistant with the main branch version always. (CEC)
  63. }
  64. type
  65. ttarget =
  66. (
  67. target_none, { 0 }
  68. obsolete_target_i386_GO32V1,{ 1 }
  69. target_i386_GO32V2, { 2 }
  70. target_i386_linux, { 3 }
  71. target_i386_OS2, { 4 }
  72. target_i386_Win32, { 5 }
  73. target_i386_freebsd, { 6 }
  74. target_m68k_Amiga, { 7 }
  75. target_m68k_Atari, { 8 }
  76. target_m68k_Mac, { 9 }
  77. target_m68k_linux, { 10 }
  78. target_m68k_PalmOS, { 11 }
  79. target_alpha_linux, { 12 }
  80. target_powerpc_linux, { 13 }
  81. target_powerpc_macos, { 14 }
  82. target_i386_sunos, { 15 }
  83. target_i386_beos, { 16 }
  84. target_i386_netbsd, { 17 }
  85. target_m68k_netbsd, { 18 }
  86. target_i386_Netware, { 19 }
  87. target_i386_qnx, { 20 }
  88. target_i386_wdosx, { 21 }
  89. target_sparc_sunos, { 22 }
  90. target_sparc_linux { 23 }
  91. );
  92. tasm = (as_none
  93. ,as_i386_as,as_i386_as_aout,as_i386_asw,as_i386_aswdosx,
  94. as_i386_nasmcoff,as_i386_nasmwin32,as_i386_nasmwdosx,
  95. as_i386_nasmelf,as_i386_nasmobj,
  96. as_i386_tasm,as_i386_masm,
  97. as_i386_dbg,as_i386_coff,as_i386_pecoff,as_i386_elf32,as_i386_pecoffwdosx
  98. ,as_m68k_as,as_m68k_gas,as_m68k_mit,as_m68k_mot,
  99. as_m68k_mpw,as_m68k_palm
  100. ,as_alpha_as
  101. ,as_powerpc_as,as_powerpc_mpw
  102. );
  103. tld = (ld_none,
  104. ld_i386_GO32V1,ld_i386_GO32V2,ld_i386_linux,
  105. ld_i386_OS2,ld_i386_Win32,ld_i386_freebsd,
  106. ld_i386_Netware,ld_i386_sunos,ld_i386_beos,
  107. ld_m68k_Amiga,ld_m68k_Atari,ld_m68k_Mac,
  108. ld_m68k_linux,ld_m68k_PalmOS,ld_m68k_freebsd,
  109. ld_alpha_linux,
  110. ld_powerpc_linux,ld_powerpc_macos,ld_i386_Wdosx
  111. );
  112. tar = (ar_none
  113. ,ar_gnu_ar,ar_gnu_arw
  114. );
  115. tres = (res_none
  116. ,res_gnu_windres,res_emxbind
  117. );
  118. tscripttype = (script_none
  119. ,script_dos,script_unix,script_amiga
  120. );
  121. {*****************************************************************************
  122. Structures
  123. *****************************************************************************}
  124. type
  125. palignmentinfo = ^talignmentinfo;
  126. talignmentinfo = packed record
  127. procalign,
  128. loopalign,
  129. jumpalign,
  130. constalignmin,
  131. constalignmax,
  132. varalignmin,
  133. varalignmax,
  134. localalignmin,
  135. localalignmax,
  136. paraalign,
  137. recordalignmin,
  138. recordalignmax,
  139. maxCrecordalign : longint;
  140. end;
  141. pasminfo = ^tasminfo;
  142. tasminfo = packed record
  143. id : tasm;
  144. idtxt : string[9];
  145. asmbin : string[8];
  146. asmcmd : string[50];
  147. supported_target : ttarget;
  148. outputbinary,
  149. allowdirect,
  150. externals,
  151. needar,
  152. labelprefix_only_inside_procedure : boolean;
  153. labelprefix : string[3];
  154. comment : string[2];
  155. secnames : array[tsection] of string[20];
  156. end;
  157. parinfo = ^tarinfo;
  158. tarinfo = packed record
  159. id : tar;
  160. arcmd : string[50];
  161. end;
  162. presinfo = ^tresinfo;
  163. tresinfo = packed record
  164. id : tres;
  165. resbin : string[8];
  166. rescmd : string[50];
  167. end;
  168. {# }
  169. ttargetflags = (tf_none,
  170. tf_under_development,
  171. tf_need_export,tf_needs_isconsole
  172. ,tf_code_small,tf_static_reg_based
  173. );
  174. ptargetinfo = ^ttargetinfo;
  175. ttargetinfo = packed record
  176. target : ttarget;
  177. name : string[30];
  178. shortname : string[9];
  179. flags : set of ttargetflags;
  180. cpu : ttargetcpu;
  181. unit_env : string[12];
  182. extradefines : string[40];
  183. sourceext,
  184. pasext,
  185. exeext,
  186. defext,
  187. scriptext,
  188. smartext,
  189. unitext,
  190. unitlibext,
  191. asmext,
  192. objext,
  193. resext,
  194. resobjext : string[4];
  195. sharedlibext : string[10];
  196. staticlibext,
  197. staticlibprefix : string[4];
  198. sharedlibprefix : string[4];
  199. sharedClibext : string[10];
  200. staticClibext,
  201. staticClibprefix : string[4];
  202. sharedClibprefix : string[4];
  203. Cprefix : string[2];
  204. newline : string[2];
  205. dirsep : char;
  206. files_case_relevent : boolean;
  207. assem : tasm;
  208. assemextern : tasm; { external assembler, used by -a }
  209. link : tld;
  210. linkextern : tld; { external linker, used by -s }
  211. ar : tar;
  212. res : tres;
  213. script : tscripttype;
  214. endian : tendian;
  215. alignment : talignmentinfo;
  216. {
  217. Offset from the argument pointer register to the first
  218. argument's address. On some machines it may depend on
  219. the data type of the function.
  220. (see also FIRST_PARM_OFFSET in GCC source)
  221. }
  222. first_parm_offset : longint;
  223. heapsize,
  224. stacksize : longint;
  225. DllScanSupported : boolean;
  226. use_function_relative_addresses : boolean;
  227. end;
  228. pasmmodeinfo = ^tasmmodeinfo;
  229. tasmmodeinfo = packed record
  230. id : tasmmode;
  231. idtxt : string[8];
  232. end;
  233. const
  234. { alias for supported_target field in tasminfo }
  235. target_any = target_none;
  236. var
  237. targetinfos : array[ttarget] of ptargetinfo;
  238. asminfos : array[tasm] of pasminfo;
  239. arinfos : array[tar] of parinfo;
  240. resinfos : array[tres] of presinfo;
  241. asmmodeinfos : array[tasmmode] of pasmmodeinfo;
  242. source_info : ttargetinfo;
  243. target_cpu : ttargetcpu;
  244. target_info : ttargetinfo;
  245. target_asm : tasminfo;
  246. target_ar : tarinfo;
  247. target_res : tresinfo;
  248. target_path : string[12]; { for rtl/<X>/,fcl/<X>/, etc. }
  249. function set_target(t:ttarget):boolean;
  250. function set_target_asm(t:tasm):boolean;
  251. function set_target_ar(t:tar):boolean;
  252. function set_target_res(t:tres):boolean;
  253. function set_target_by_string(const s : string) : boolean;
  254. function set_target_asm_by_string(const s : string) : boolean;
  255. function set_asmmode_by_string(const s:string;var t:tasmmode):boolean;
  256. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  257. procedure RegisterTarget(const r:ttargetinfo);
  258. procedure RegisterAsmMode(const r:tasmmodeinfo);
  259. procedure RegisterRes(const r:tresinfo);
  260. procedure RegisterAr(const r:tarinfo);
  261. procedure InitSystems;
  262. implementation
  263. uses
  264. cutils;
  265. {****************************************************************************
  266. Target setting
  267. ****************************************************************************}
  268. function set_target(t:ttarget):boolean;
  269. begin
  270. set_target:=false;
  271. if assigned(targetinfos[t]) then
  272. begin
  273. target_info:=targetinfos[t]^;
  274. set_target_asm(target_info.assem);
  275. set_target_ar(target_info.ar);
  276. set_target_res(target_info.res);
  277. target_path:=lower(target_info.shortname);
  278. target_cpu:=target_info.cpu;
  279. set_target:=true;
  280. exit;
  281. end;
  282. end;
  283. function set_target_asm(t:tasm):boolean;
  284. begin
  285. set_target_asm:=false;
  286. if assigned(asminfos[t]) then
  287. begin
  288. target_asm:=asminfos[t]^;
  289. set_target_asm:=true;
  290. exit;
  291. end;
  292. end;
  293. function set_target_ar(t:tar):boolean;
  294. begin
  295. set_target_ar:=false;
  296. if assigned(arinfos[t]) then
  297. begin
  298. target_ar:=arinfos[t]^;
  299. set_target_ar:=true;
  300. exit;
  301. end;
  302. end;
  303. function set_target_res(t:tres):boolean;
  304. begin
  305. set_target_res:=false;
  306. if assigned(resinfos[t]) then
  307. begin
  308. target_res:=resinfos[t]^;
  309. set_target_res:=true;
  310. exit;
  311. end;
  312. end;
  313. function set_target_by_string(const s : string) : boolean;
  314. var
  315. hs : string;
  316. t : ttarget;
  317. begin
  318. set_target_by_string:=false;
  319. { this should be case insensitive !! PM }
  320. hs:=upper(s);
  321. for t:=low(ttarget) to high(ttarget) do
  322. if assigned(targetinfos[t]) and
  323. (upper(targetinfos[t]^.shortname)=hs) then
  324. begin
  325. set_target_by_string:=set_target(t);
  326. exit;
  327. end;
  328. end;
  329. function set_target_asm_by_string(const s : string) : boolean;
  330. var
  331. hs : string;
  332. t : tasm;
  333. begin
  334. set_target_asm_by_string:=false;
  335. { this should be case insensitive !! PM }
  336. hs:=upper(s);
  337. for t:=low(tasm) to high(tasm) do
  338. if assigned(asminfos[t]) and
  339. (asminfos[t]^.idtxt=hs) then
  340. begin
  341. set_target_asm_by_string:=set_target_asm(t);
  342. exit;
  343. end;
  344. end;
  345. function set_asmmode_by_string(const s:string;var t:tasmmode):boolean;
  346. var
  347. hs : string;
  348. ht : tasmmode;
  349. begin
  350. set_asmmode_by_string:=false;
  351. { this should be case insensitive !! PM }
  352. hs:=upper(s);
  353. for ht:=low(tasmmode) to high(tasmmode) do
  354. if assigned(asmmodeinfos[ht]) and
  355. (asmmodeinfos[ht]^.idtxt=hs) then
  356. begin
  357. t:=asmmodeinfos[ht]^.id;
  358. set_asmmode_by_string:=true;
  359. end;
  360. end;
  361. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  362. begin
  363. with d do
  364. begin
  365. { general update rules:
  366. minimum: if higher then update
  367. maximum: if lower then update or if undefined then update }
  368. if s.procalign>procalign then
  369. procalign:=s.procalign;
  370. if s.loopalign>loopalign then
  371. loopalign:=s.loopalign;
  372. if s.jumpalign>jumpalign then
  373. jumpalign:=s.jumpalign;
  374. if s.constalignmin>constalignmin then
  375. constalignmin:=s.constalignmin;
  376. if (constalignmax=0) or
  377. ((s.constalignmax>0) and (s.constalignmax<constalignmax)) then
  378. constalignmax:=s.constalignmax;
  379. if s.varalignmin>varalignmin then
  380. varalignmin:=s.varalignmin;
  381. if (varalignmax=0) or
  382. ((s.varalignmax>0) and (s.varalignmax<varalignmax)) then
  383. varalignmax:=s.varalignmax;
  384. if s.localalignmin>localalignmin then
  385. localalignmin:=s.localalignmin;
  386. if (localalignmax=0) or
  387. ((s.localalignmax>0) and (s.localalignmax<localalignmax)) then
  388. localalignmax:=s.localalignmax;
  389. if s.paraalign>paraalign then
  390. paraalign:=s.paraalign;
  391. if s.recordalignmin>recordalignmin then
  392. recordalignmin:=s.recordalignmin;
  393. if (recordalignmax=0) or
  394. ((s.recordalignmax>0) and (s.recordalignmax<recordalignmax)) then
  395. recordalignmax:=s.recordalignmax;
  396. if (maxCrecordalign=0) or
  397. ((s.maxCrecordalign>0) and (s.maxCrecordalign<maxCrecordalign)) then
  398. maxCrecordalign:=s.maxCrecordalign;
  399. end;
  400. end;
  401. {****************************************************************************
  402. Target registration
  403. ****************************************************************************}
  404. procedure RegisterTarget(const r:ttargetinfo);
  405. var
  406. t : ttarget;
  407. begin
  408. t:=r.target;
  409. if assigned(targetinfos[t]) then
  410. writeln('Warning: Target is already registered!')
  411. else
  412. Getmem(targetinfos[t],sizeof(ttargetinfo));
  413. targetinfos[t]^:=r;
  414. end;
  415. procedure RegisterAsmmode(const r:tasmmodeinfo);
  416. var
  417. t : tasmmode;
  418. begin
  419. t:=r.id;
  420. if assigned(asmmodeinfos[t]) then
  421. writeln('Warning: Asmmode is already registered!')
  422. else
  423. Getmem(asmmodeinfos[t],sizeof(tasmmodeinfo));
  424. asmmodeinfos[t]^:=r;
  425. end;
  426. procedure RegisterRes(const r:tresinfo);
  427. var
  428. t : tres;
  429. begin
  430. t:=r.id;
  431. if assigned(resinfos[t]) then
  432. writeln('Warning: resourcecompiler is already registered!')
  433. else
  434. Getmem(resinfos[t],sizeof(tresinfo));
  435. resinfos[t]^:=r;
  436. end;
  437. procedure RegisterAr(const r:tarinfo);
  438. var
  439. t : tar;
  440. begin
  441. t:=r.id;
  442. if assigned(arinfos[t]) then
  443. writeln('Warning: ar is already registered!')
  444. else
  445. Getmem(arinfos[t],sizeof(tarinfo));
  446. arinfos[t]^:=r;
  447. end;
  448. procedure DeregisterInfos;
  449. var
  450. assem : tasm;
  451. target : ttarget;
  452. ar : tar;
  453. asmmode : tasmmode;
  454. res : tres;
  455. begin
  456. for target:=low(ttarget) to high(ttarget) do
  457. if assigned(targetinfos[target]) then
  458. begin
  459. freemem(targetinfos[target],sizeof(ttargetinfo));
  460. targetinfos[target]:=nil;
  461. end;
  462. for assem:=low(tasm) to high(tasm) do
  463. if assigned(asminfos[assem]) then
  464. begin
  465. freemem(asminfos[assem],sizeof(tasminfo));
  466. asminfos[assem]:=nil;
  467. end;
  468. for ar:=low(tar) to high(tar) do
  469. if assigned(arinfos[ar]) then
  470. begin
  471. freemem(arinfos[ar],sizeof(tarinfo));
  472. arinfos[ar]:=nil;
  473. end;
  474. for res:=low(tres) to high(tres) do
  475. if assigned(resinfos[res]) then
  476. begin
  477. freemem(resinfos[res],sizeof(tresinfo));
  478. resinfos[res]:=nil;
  479. end;
  480. for asmmode:=low(tasmmode) to high(tasmmode) do
  481. if assigned(asmmodeinfos[asmmode]) then
  482. begin
  483. freemem(asmmodeinfos[asmmode],sizeof(tasmmodeinfo));
  484. asmmodeinfos[asmmode]:=nil;
  485. end;
  486. end;
  487. {****************************************************************************
  488. Initialization of default target
  489. ****************************************************************************}
  490. procedure default_target(t:ttarget);
  491. begin
  492. set_target(t);
  493. if source_info.name='' then
  494. source_info:=target_info;
  495. end;
  496. procedure set_source(t:ttarget);
  497. begin
  498. { can't use message() here (PFV) }
  499. if source_info.name<>'' then
  500. Writeln('Warning: Source OS Redefined!');
  501. if assigned(targetinfos[t]) then
  502. source_info:=targetinfos[t]^
  503. else
  504. Writeln('Warning: Source OS Not Supported!');
  505. end;
  506. procedure InitSystems;
  507. begin
  508. { first get source OS }
  509. source_info.name:='';
  510. { please note then we use cpu86 and cpu68 here on purpose !! }
  511. {$ifdef cpu86}
  512. {$ifdef GO32V2}
  513. set_source(target_i386_GO32V2);
  514. {$else}
  515. {$ifdef OS2}
  516. set_source(target_i386_OS2);
  517. if (OS_Mode = osDOS) or (OS_Mode = osDPMI) then
  518. source_info.scriptext := '.bat';
  519. { OS/2 via EMX can be run under DOS as well }
  520. {$else}
  521. {$ifdef WIN32}
  522. {$ifdef WDOSX}
  523. set_source(target_i386_wdosx);
  524. {$else}
  525. set_source(target_i386_WIN32);
  526. {$endif}
  527. {$else}
  528. {$ifdef FreeBSD}
  529. set_source(target_i386_FreeBSD);
  530. {$else}
  531. {$ifdef netbsd}
  532. set_source(target_i386_NetBSD);
  533. {$else}
  534. {$ifdef sunos}
  535. set_source(target_i386_sunos);
  536. {$else}
  537. {$ifdef beos}
  538. set_source(target_i386_beos);
  539. {$else}
  540. { Must be the last as some freebsd also
  541. defined linux }
  542. {$ifdef linux}
  543. set_source(target_i386_linux);
  544. {$else}
  545. {$error Error setting source OS}
  546. {$endif linux}
  547. {$endif beos}
  548. {$endif sunos}
  549. {$endif netbsd}
  550. {$endif freebsd}
  551. {$endif win32}
  552. {$endif os2}
  553. {$endif go32v2}
  554. {$endif cpu86}
  555. {$ifdef cpu68}
  556. {$ifdef AMIGA}
  557. set_source(target_m68k_Amiga);
  558. {$else}
  559. {$ifdef ATARI}
  560. set_source(target_m68k_Atari);
  561. {$else}
  562. {$ifdef MACOS}
  563. set_source(target_m68k_MAC);
  564. {$else}
  565. {$ifdef linux}
  566. set_source(target_m68k_linux);
  567. {$endif linux}
  568. {$endif macos}
  569. {$endif atari}
  570. {$endif amiga}
  571. {$endif cpu68}
  572. { Now default target, this is dependent on the i386 or m68k define,
  573. when the define is the same as the current cpu then we use the source
  574. os, else we pick a default }
  575. {$ifdef i386}
  576. {$ifdef cpu86}
  577. default_target(source_info.target);
  578. {$else cpu86}
  579. default_target(target_i386_linux);
  580. {$endif cpu86}
  581. {$endif i386}
  582. {$ifdef m68k}
  583. {$ifdef cpu68}
  584. default_target(source_info.target);
  585. {$else cpu68}
  586. default_target(target_m68k_linux);
  587. {$endif cpu68}
  588. {$endif m68k}
  589. {$ifdef alpha}
  590. {$ifdef cpualpha}
  591. default_target(source_info.target);
  592. {$else cpualpha}
  593. default_target(target_alpha_linux);
  594. {$endif cpualpha}
  595. {$endif alpha}
  596. {$ifdef powerpc}
  597. {$ifdef cpuppc}
  598. default_target(source_info.target);
  599. {$else cpuppc}
  600. default_target(target_powerpc_linux);
  601. {$endif cpuppc}
  602. {$endif powerpc}
  603. end;
  604. initialization
  605. finalization
  606. DeregisterInfos;
  607. end.
  608. {
  609. $Log$
  610. Revision 1.41 2002-04-24 16:08:30 carl
  611. * fix compilation problem
  612. Revision 1.40 2002/04/20 21:32:26 carl
  613. + generic FPC_CHECKPOINTER
  614. + first parameter offset in stack now portable
  615. * rename some constants
  616. + move some cpu stuff to other units
  617. - remove unused constents
  618. * fix stacksize for some targets
  619. * fix generic size problems which depend now on EXTEND_SIZE constant
  620. Revision 1.39 2002/04/15 19:08:22 carl
  621. + target_info.size_of_pointer -> pointer_size
  622. + some cleanup of unused types/variables
  623. Revision 1.38 2002/04/14 16:56:30 carl
  624. - remove duplicate comment
  625. Revision 1.37 2002/04/07 10:20:15 carl
  626. + added SPARC targets
  627. + added VM target
  628. Revision 1.36 2002/04/04 19:18:06 carl
  629. - removed cmnts
  630. }