ag386nsm.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. {
  2. $Id$
  3. Copyright (c) 1996,97 by Florian Klaempfl
  4. This unit implements an asmoutput class for the Nasm assembler with
  5. Intel syntax for the i386+
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 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. {$ifdef TP}
  20. {$N+,E+}
  21. {$endif}
  22. unit ag386nsm;
  23. interface
  24. uses aasm,assemble;
  25. type
  26. pi386nasmasmlist=^ti386nasmasmlist;
  27. ti386nasmasmlist = object(tasmlist)
  28. procedure WriteTree(p:paasmoutput);virtual;
  29. procedure WriteAsmList;virtual;
  30. end;
  31. implementation
  32. uses
  33. dos,globals,systems,cobjects,i386,
  34. strings,files,verbose
  35. {$ifdef GDB}
  36. ,gdb
  37. {$endif GDB}
  38. ;
  39. const
  40. line_length = 70;
  41. extstr : array[EXT_NEAR..EXT_ABS] of String[8] =
  42. ('NEAR','FAR','PROC','BYTE','WORD','DWORD',
  43. 'CODEPTR','DATAPTR','FWORD','PWORD','QWORD','TBYTE','ABS');
  44. function double2str(d : double) : string;
  45. var
  46. hs : string;
  47. p : byte;
  48. begin
  49. str(d,hs);
  50. { nasm expects a lowercase e }
  51. p:=pos('E',hs);
  52. if p>0 then
  53. hs[p]:='e';
  54. p:=pos('+',hs);
  55. if p>0 then
  56. delete(hs,p,1);
  57. double2str:=lower(hs);
  58. end;
  59. function extended2str(e : extended) : string;
  60. var
  61. hs : string;
  62. p : byte;
  63. begin
  64. str(e,hs);
  65. { nasm expects a lowercase e }
  66. p:=pos('E',hs);
  67. if p>0 then
  68. hs[p]:='e';
  69. p:=pos('+',hs);
  70. if p>0 then
  71. delete(hs,p,1);
  72. extended2str:=lower(hs);
  73. end;
  74. function comp2str(d : bestreal) : string;
  75. type
  76. pdouble = ^double;
  77. var
  78. c : comp;
  79. dd : pdouble;
  80. begin
  81. {$ifdef TP}
  82. c:=d;
  83. {$else}
  84. c:=comp(d);
  85. {$endif}
  86. dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
  87. comp2str:=double2str(dd^);
  88. end;
  89. function getreferencestring(const ref : treference) : string;
  90. var
  91. s : string;
  92. first : boolean;
  93. begin
  94. if ref.isintvalue then
  95. s:= tostr(ref.offset)
  96. else
  97. with ref do
  98. begin
  99. first:=true;
  100. if ref.segment<>R_DEFAULT_SEG then
  101. s:='['+int_reg2str[segment]+':'
  102. else
  103. s:='[';
  104. if assigned(symbol) then
  105. begin
  106. s:=s+symbol^;
  107. first:=false;
  108. end;
  109. if (base<>R_NO) then
  110. begin
  111. if not(first) then
  112. s:=s+'+'
  113. else
  114. first:=false;
  115. s:=s+int_reg2str[base];
  116. end;
  117. if (index<>R_NO) then
  118. begin
  119. if not(first) then
  120. s:=s+'+'
  121. else
  122. first:=false;
  123. s:=s+int_reg2str[index];
  124. if scalefactor<>0 then
  125. s:=s+'*'+tostr(scalefactor);
  126. end;
  127. if offset<0 then
  128. s:=s+tostr(offset)
  129. else if (offset>0) then
  130. s:=s+'+'+tostr(offset);
  131. s:=s+']';
  132. end;
  133. getreferencestring:=s;
  134. end;
  135. function getopstr(t : byte;o : pointer;s : topsize; _operator: tasmop;dest : boolean) : string;
  136. var
  137. hs : string;
  138. begin
  139. case t of
  140. top_reg : getopstr:=int_nasmreg2str[tregister(o)];
  141. top_const,
  142. top_ref : begin
  143. if t=top_const then
  144. hs := tostr(longint(o))
  145. else
  146. hs:=getreferencestring(preference(o)^);
  147. if not ((_operator = A_LEA) or (_operator = A_LGS) or
  148. (_operator = A_LSS) or (_operator = A_LFS) or
  149. (_operator = A_LES) or (_operator = A_LDS) or
  150. (_operator = A_SHR) or (_operator = A_SHL) or
  151. (_operator = A_SAR) or (_operator = A_SAL) or
  152. (_operator = A_OUT) or (_operator = A_IN)) then
  153. begin
  154. case s of
  155. S_B : hs:='byte '+hs;
  156. S_W : hs:='word '+hs;
  157. S_L : hs:='dword '+hs;
  158. S_IS : hs:='word '+hs;
  159. S_IL : hs:='dword '+hs;
  160. S_IQ : hs:='qword '+hs;
  161. S_FS : hs:='dword '+hs;
  162. S_FL : hs:='qword '+hs;
  163. S_FX : hs:='tword '+hs;
  164. S_BW : if dest then
  165. hs:='word '+hs
  166. else
  167. hs:='byte '+hs;
  168. S_BL : if dest then
  169. hs:='dword '+hs
  170. else
  171. hs:='byte '+hs;
  172. S_WL : if dest then
  173. hs:='dword '+hs
  174. else
  175. hs:='word '+hs;
  176. end
  177. end;
  178. getopstr:=hs;
  179. end;
  180. top_symbol : begin
  181. hs:=strpas(pchar(pcsymbol(o)^.symbol));
  182. hs:='dword '+hs;
  183. if pcsymbol(o)^.offset>0 then
  184. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  185. else
  186. if pcsymbol(o)^.offset<0 then
  187. hs:=hs+tostr(pcsymbol(o)^.offset);
  188. getopstr:=hs;
  189. end;
  190. else
  191. internalerror(10001);
  192. end;
  193. end;
  194. function getopstr_jmp(t : byte;o : pointer) : string;
  195. var
  196. hs : string;
  197. begin
  198. case t of
  199. top_reg : getopstr_jmp:=int_reg2str[tregister(o)];
  200. top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
  201. top_const : getopstr_jmp:=tostr(longint(o));
  202. top_symbol : begin
  203. hs:=strpas(pchar(pcsymbol(o)^.symbol));
  204. if pcsymbol(o)^.offset>0 then
  205. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  206. else
  207. if pcsymbol(o)^.offset<0 then
  208. hs:=hs+tostr(pcsymbol(o)^.offset);
  209. getopstr_jmp:=hs;
  210. end;
  211. else
  212. internalerror(10001);
  213. end;
  214. end;
  215. {****************************************************************************
  216. Ti386nasmasmlist
  217. ****************************************************************************}
  218. var
  219. LastSec : tsection;
  220. const
  221. ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
  222. (#9'DD'#9,#9'DW'#9,#9'DB'#9);
  223. ait_section2nasmstr : array[tsection] of string[6]=
  224. ('','.text','.data','.bss','.idata','.edata');
  225. Function PadTabs(p:pchar;addch:char):string;
  226. var
  227. s : string;
  228. i : longint;
  229. begin
  230. i:=strlen(p);
  231. if addch<>#0 then
  232. begin
  233. inc(i);
  234. s:=StrPas(p)+addch;
  235. end
  236. else
  237. s:=StrPas(p);
  238. if i<8 then
  239. PadTabs:=s+#9#9
  240. else
  241. PadTabs:=s+#9;
  242. end;
  243. procedure ti386nasmasmlist.WriteTree(p:paasmoutput);
  244. type
  245. twowords=record
  246. word1,word2:word;
  247. end;
  248. var
  249. s,
  250. prefix,
  251. suffix : string;
  252. hp : pai;
  253. counter,
  254. lines,
  255. i,j,l : longint;
  256. op : tasmop;
  257. consttyp : tait;
  258. found,
  259. quoted : boolean;
  260. begin
  261. if not assigned(p) then
  262. exit;
  263. hp:=pai(p^.first);
  264. while assigned(hp) do
  265. begin
  266. case hp^.typ of
  267. ait_comment : Begin
  268. AsmWrite(target_asm.comment);
  269. AsmWritePChar(pai_asm_comment(hp)^.str);
  270. AsmLn;
  271. End;
  272. ait_regalloc,
  273. ait_regdealloc :;
  274. ait_section : begin
  275. if pai_section(hp)^.sec<>sec_none then
  276. begin
  277. AsmLn;
  278. AsmWriteLn('SECTION '+ait_section2nasmstr[pai_section(hp)^.sec]);
  279. end;
  280. LastSec:=pai_section(hp)^.sec;
  281. end;
  282. ait_align : AsmWriteLn(#9'ALIGN '+tostr(pai_align(hp)^.aligntype));
  283. ait_external : AsmWriteLn('EXTERN '+StrPas(pai_external(hp)^.name));
  284. ait_datablock : begin
  285. if pai_datablock(hp)^.is_global then
  286. AsmWriteLn(#9'GLOBAL '+StrPas(pai_datablock(hp)^.name));
  287. AsmWriteLn(PadTabs(pai_datablock(hp)^.name,':')+'RESB'#9+tostr(pai_datablock(hp)^.size));
  288. end;
  289. ait_const_32bit,
  290. ait_const_8bit,
  291. ait_const_16bit : begin
  292. AsmWrite(ait_const2str[hp^.typ]+tostr(pai_const(hp)^.value));
  293. consttyp:=hp^.typ;
  294. l:=0;
  295. repeat
  296. found:=(not (Pai(hp^.next)=nil)) and (Pai(hp^.next)^.typ=consttyp);
  297. if found then
  298. begin
  299. hp:=Pai(hp^.next);
  300. s:=','+tostr(pai_const(hp)^.value);
  301. AsmWrite(s);
  302. inc(l,length(s));
  303. end;
  304. until (not found) or (l>line_length);
  305. AsmLn;
  306. end;
  307. ait_const_symbol : begin
  308. AsmWrite(#9#9+'DD '#9);
  309. AsmWritePChar(pchar(pai_const(hp)^.value));
  310. AsmLn;
  311. end;
  312. ait_const_symbol_offset : begin
  313. AsmWrite(#9#9+'DD '#9);
  314. AsmWritePChar(pai_const_symbol_offset(hp)^.name);
  315. if pai_const_symbol_offset(hp)^.offset>0 then
  316. AsmWrite('+'+tostr(pai_const_symbol_offset(hp)^.offset))
  317. else if pai_const_symbol_offset(hp)^.offset<0 then
  318. AsmWrite(tostr(pai_const_symbol_offset(hp)^.offset));
  319. AsmLn;
  320. end;
  321. ait_real_32bit : AsmWriteLn(#9#9'DD'#9+double2str(pai_single(hp)^.value));
  322. ait_real_64bit : AsmWriteLn(#9#9'DQ'#9+double2str(pai_double(hp)^.value));
  323. ait_real_extended : AsmWriteLn(#9#9'DT'#9+extended2str(pai_extended(hp)^.value));
  324. ait_comp : AsmWriteLn(#9#9'DQ'#9+comp2str(pai_extended(hp)^.value));
  325. ait_string : begin
  326. counter := 0;
  327. lines := pai_string(hp)^.len div line_length;
  328. { separate lines in different parts }
  329. if pai_string(hp)^.len > 0 then
  330. Begin
  331. for j := 0 to lines-1 do
  332. begin
  333. AsmWrite(#9#9'DB'#9);
  334. quoted:=false;
  335. for i:=counter to counter+line_length do
  336. begin
  337. { it is an ascii character. }
  338. if (ord(pai_string(hp)^.str[i])>31) and
  339. (ord(pai_string(hp)^.str[i])<128) and
  340. (pai_string(hp)^.str[i]<>'"') then
  341. begin
  342. if not(quoted) then
  343. begin
  344. if i>counter then
  345. AsmWrite(',');
  346. AsmWrite('"');
  347. end;
  348. AsmWrite(pai_string(hp)^.str[i]);
  349. quoted:=true;
  350. end { if > 31 and < 128 and ord('"') }
  351. else
  352. begin
  353. if quoted then
  354. AsmWrite('"');
  355. if i>counter then
  356. AsmWrite(',');
  357. quoted:=false;
  358. AsmWrite(tostr(ord(pai_string(hp)^.str[i])));
  359. end;
  360. end; { end for i:=0 to... }
  361. if quoted then AsmWrite('"');
  362. AsmWrite(target_os.newline);
  363. counter := counter+line_length;
  364. end; { end for j:=0 ... }
  365. { do last line of lines }
  366. AsmWrite(#9#9'DB'#9);
  367. quoted:=false;
  368. for i:=counter to pai_string(hp)^.len-1 do
  369. begin
  370. { it is an ascii character. }
  371. if (ord(pai_string(hp)^.str[i])>31) and
  372. (ord(pai_string(hp)^.str[i])<128) and
  373. (pai_string(hp)^.str[i]<>'"') then
  374. begin
  375. if not(quoted) then
  376. begin
  377. if i>counter then
  378. AsmWrite(',');
  379. AsmWrite('"');
  380. end;
  381. AsmWrite(pai_string(hp)^.str[i]);
  382. quoted:=true;
  383. end { if > 31 and < 128 and " }
  384. else
  385. begin
  386. if quoted then
  387. AsmWrite('"');
  388. if i>counter then
  389. AsmWrite(',');
  390. quoted:=false;
  391. AsmWrite(tostr(ord(pai_string(hp)^.str[i])));
  392. end;
  393. end; { end for i:=0 to... }
  394. if quoted then
  395. AsmWrite('"');
  396. end;
  397. AsmLn;
  398. end;
  399. ait_label : begin
  400. if pai_label(hp)^.l^.is_used then
  401. AsmWriteLn(lab2str(pai_label(hp)^.l)+':');
  402. end;
  403. ait_direct : begin
  404. AsmWritePChar(pai_direct(hp)^.str);
  405. AsmLn;
  406. end;
  407. ait_labeled_instruction :
  408. begin
  409. op:=pai_labeled(hp)^._operator;
  410. if not((op=A_JMP) or (op=A_LOOP) or (op=A_LOOPZ) or
  411. (op=A_LOOPE) or (op=A_LOOPNZ) or (op=A_LOOPNE) or
  412. (op=A_JCXZ) or (op=A_JECXZ)) then
  413. AsmWriteLn(#9#9+int_op2str[pai_labeled(hp)^._operator]+#9+'near '+lab2str(pai_labeled(hp)^.lab))
  414. else
  415. AsmWriteLn(#9#9+int_op2str[pai_labeled(hp)^._operator]+#9+lab2str(pai_labeled(hp)^.lab));
  416. end;
  417. ait_symbol : begin
  418. if pai_symbol(hp)^.is_global then
  419. AsmWriteLn(#9'GLOBAL '+StrPas(pai_symbol(hp)^.name));
  420. AsmWritePChar(pai_symbol(hp)^.name);
  421. if assigned(hp^.next) and not(pai(hp^.next)^.typ in
  422. [ait_const_32bit,ait_const_16bit,ait_const_8bit,
  423. ait_const_symbol,ait_const_symbol_offset,
  424. ait_real_64bit,ait_string]) then
  425. AsmWriteLn(':')
  426. end;
  427. ait_instruction : begin
  428. suffix:='';
  429. prefix:= '';
  430. { added prefix instructions, must be on same line as opcode }
  431. if (pai386(hp)^.op1t = top_none) and
  432. ((pai386(hp)^._operator = A_REP) or
  433. (pai386(hp)^._operator = A_LOCK) or
  434. (pai386(hp)^._operator = A_REPE) or
  435. (pai386(hp)^._operator = A_REPNE)) then
  436. Begin
  437. prefix:=int_op2str[pai386(hp)^._operator]+#9;
  438. hp:=Pai(hp^.next);
  439. { this is theorically impossible... }
  440. if hp=nil then
  441. begin
  442. s:=#9#9+prefix;
  443. AsmWriteLn(s);
  444. break;
  445. end;
  446. { nasm prefers prefix on a line alone }
  447. AsmWriteln(#9#9+prefix);
  448. prefix:='';
  449. end
  450. else
  451. prefix:= '';
  452. { A_FNSTS need the w as suffix at least for nasm}
  453. if (pai386(hp)^._operator = A_FNSTS) then
  454. pai386(hp)^._operator:=A_FNSTSW
  455. else
  456. if (pai386(hp)^._operator = A_FSTS) then
  457. pai386(hp)^._operator:=A_FSTSW;
  458. if pai386(hp)^.op1t<>top_none then
  459. begin
  460. if pai386(hp)^._operator=A_CALL then
  461. s:=getopstr_jmp(pai386(hp)^.op1t,pai386(hp)^.op1)
  462. else
  463. begin
  464. s:=getopstr(pai386(hp)^.op1t,pai386(hp)^.op1,pai386(hp)^.size,pai386(hp)^._operator,false);
  465. if pai386(hp)^.op3t<>top_none then
  466. begin
  467. if pai386(hp)^.op2t<>top_none then
  468. s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),
  469. pai386(hp)^.size,pai386(hp)^._operator,true)+','+s;
  470. s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),
  471. pai386(hp)^.size,pai386(hp)^._operator,false)+','+s;
  472. end
  473. else
  474. if pai386(hp)^.op2t<>top_none then
  475. s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,pai386(hp)^.size,
  476. pai386(hp)^._operator,true)+','+s;
  477. end;
  478. s:=#9+s;
  479. end
  480. else
  481. begin
  482. { check if string instruction }
  483. { long form, otherwise may give range check errors }
  484. { in turbo pascal... }
  485. if ((pai386(hp)^._operator = A_CMPS) or
  486. (pai386(hp)^._operator = A_INS) or
  487. (pai386(hp)^._operator = A_OUTS) or
  488. (pai386(hp)^._operator = A_SCAS) or
  489. (pai386(hp)^._operator = A_STOS) or
  490. (pai386(hp)^._operator = A_MOVS) or
  491. (pai386(hp)^._operator = A_LODS) or
  492. (pai386(hp)^._operator = A_XLAT)) then
  493. Begin
  494. case pai386(hp)^.size of
  495. S_B: suffix:='b';
  496. S_W: suffix:='w';
  497. S_L: suffix:='d';
  498. else
  499. Message(assem_f_invalid_suffix_intel);
  500. end;
  501. end;
  502. s:='';
  503. end;
  504. if pai386(hp)^._operator=A_FWAIT then
  505. AsmWriteln(#9#9'DB'#9'09bh')
  506. else
  507. AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^._operator]+suffix+s);
  508. end;
  509. {$ifdef GDB}
  510. ait_stabn,
  511. ait_stabs,
  512. ait_force_line,
  513. ait_stab_function_name : ;
  514. {$endif GDB}
  515. ait_marker : ;
  516. else
  517. internalerror(10000);
  518. end;
  519. hp:=pai(hp^.next);
  520. end;
  521. end;
  522. procedure ti386nasmasmlist.WriteAsmList;
  523. begin
  524. {$ifdef EXTDEBUG}
  525. if assigned(current_module^.mainsource) then
  526. comment(v_info,'Start writing nasm-styled assembler output for '+current_module^.mainsource^);
  527. {$endif}
  528. LastSec:=sec_none;
  529. AsmWriteLn('BITS 32');
  530. AsmLn;
  531. countlabelref:=false;
  532. WriteTree(externals);
  533. { Nasm doesn't support stabs
  534. WriteTree(debuglist);}
  535. WriteTree(codesegment);
  536. WriteTree(datasegment);
  537. WriteTree(consts);
  538. WriteTree(rttilist);
  539. WriteTree(bsssegment);
  540. countlabelref:=true;
  541. AsmLn;
  542. {$ifdef EXTDEBUG}
  543. if assigned(current_module^.mainsource) then
  544. comment(v_info,'Done writing nasm-styled assembler output for '+current_module^.mainsource^);
  545. {$endif EXTDEBUG}
  546. end;
  547. end.
  548. {
  549. $Log$
  550. Revision 1.16 1998-12-16 00:27:18 peter
  551. * removed some obsolete version checks
  552. Revision 1.15 1998/12/01 11:19:39 peter
  553. * fixed range problem with in [tasmop]
  554. Revision 1.14 1998/11/30 09:42:56 pierre
  555. * some range check bugs fixed (still not working !)
  556. + added DLL writing support for win32 (also accepts variables)
  557. + TempAnsi for code that could be used for Temporary ansi strings
  558. handling
  559. Revision 1.13 1998/11/17 00:26:10 peter
  560. * fixed for $H+
  561. Revision 1.12 1998/11/12 11:19:34 pierre
  562. * fix for first line of function break
  563. Revision 1.11 1998/10/12 12:20:42 pierre
  564. + added tai_const_symbol_offset
  565. for r : pointer = @var.field;
  566. * better message for different arg names on implementation
  567. of function
  568. Revision 1.10 1998/10/06 17:16:34 pierre
  569. * some memory leaks fixed (thanks to Peter for heaptrc !)
  570. Revision 1.9 1998/10/01 20:19:07 jonas
  571. + ait_marker support
  572. Revision 1.8 1998/09/20 17:11:22 jonas
  573. * released REGALLOC
  574. Revision 1.7 1998/08/11 14:01:43 peter
  575. * fixed fwait bug using direct opcode
  576. Revision 1.6 1998/08/10 15:49:39 peter
  577. * small fixes for 0.99.5
  578. Revision 1.5 1998/08/08 10:19:18 florian
  579. * small fixes to write the extended type correct
  580. Revision 1.4 1998/06/05 17:46:03 peter
  581. * tp doesn't like comp() typecast
  582. Revision 1.3 1998/05/28 17:24:27 peter
  583. - $R- for tp to solve range errors with in[]
  584. Revision 1.2 1998/05/25 17:11:37 pierre
  585. * firstpasscount bug fixed
  586. now all is already set correctly the first time
  587. under EXTDEBUG try -gp to skip all other firstpasses
  588. it works !!
  589. * small bug fixes
  590. - for smallsets with -dTESTSMALLSET
  591. - some warnings removed (by correcting code !)
  592. Revision 1.1 1998/05/23 01:20:56 peter
  593. + aktasmmode, aktoptprocessor, aktoutputformat
  594. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  595. + $LIBNAME to set the library name where the unit will be put in
  596. * splitted cgi386 a bit (codeseg to large for bp7)
  597. * nasm, tasm works again. nasm moved to ag386nsm.pas
  598. }