raz80asm.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. {
  2. Copyright (c) 1998-2008 by Carl Eric Codere and Peter Vreman
  3. Does the parsing for the Z80 styled inline assembler.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. Unit raz80asm;
  18. {$i fpcdefs.inc}
  19. Interface
  20. uses
  21. rasm,
  22. raz80,
  23. cpubase;
  24. type
  25. tz80reader = class(tasmreader)
  26. function is_asmopcode(const s: string):boolean;override;
  27. function is_register(const s:string):boolean;override;
  28. procedure handleopcode;override;
  29. procedure BuildReference(oper : tz80operand);
  30. procedure BuildOperand(oper : tz80operand);
  31. procedure BuildOpCode(instr : tz80instruction);
  32. procedure ReadSym(oper : tz80operand);
  33. procedure ConvertCalljmp(instr : tz80instruction);
  34. end;
  35. Implementation
  36. uses
  37. { helpers }
  38. cutils,
  39. { global }
  40. globtype,globals,verbose,
  41. systems,
  42. { aasm }
  43. cpuinfo,aasmbase,aasmtai,aasmdata,aasmcpu,
  44. { symtable }
  45. symconst,symbase,symtype,symsym,symtable,
  46. { parser }
  47. scanner,
  48. procinfo,
  49. itcpugas,
  50. rabase,rautils,
  51. cgbase,cgutils,cgobj
  52. ;
  53. function tz80attreader.is_register(const s:string):boolean;
  54. type
  55. treg2str = record
  56. name : string[2];
  57. reg : tregister;
  58. end;
  59. const
  60. extraregs : array[0..8] of treg2str = (
  61. (name: 'X'; reg : NR_R26),
  62. (name: 'XL'; reg : NR_R26),
  63. (name: 'XH'; reg : NR_R27),
  64. (name: 'Y'; reg : NR_R28),
  65. (name: 'YL'; reg : NR_R28),
  66. (name: 'YH'; reg : NR_R29),
  67. (name: 'Z'; reg : NR_R30),
  68. (name: 'ZL'; reg : NR_R30),
  69. (name: 'ZH'; reg : NR_R31)
  70. );
  71. var
  72. i : longint;
  73. begin
  74. result:=inherited is_register(s);
  75. { reg found?
  76. possible aliases are always 2 char
  77. }
  78. if result or (not (length(s) in [1,2])) then
  79. exit;
  80. for i:=low(extraregs) to high(extraregs) do
  81. begin
  82. if s=extraregs[i].name then
  83. begin
  84. actasmregister:=extraregs[i].reg;
  85. result:=true;
  86. actasmtoken:=AS_REGISTER;
  87. exit;
  88. end;
  89. end;
  90. end;
  91. procedure tz80attreader.ReadSym(oper : tz80operand);
  92. var
  93. tempstr, mangledname : string;
  94. typesize,l,k : aint;
  95. begin
  96. tempstr:=actasmpattern;
  97. Consume(AS_ID);
  98. { typecasting? }
  99. if (actasmtoken=AS_LPAREN) and
  100. SearchType(tempstr,typesize) then
  101. begin
  102. oper.hastype:=true;
  103. Consume(AS_LPAREN);
  104. BuildOperand(oper);
  105. Consume(AS_RPAREN);
  106. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  107. oper.SetSize(typesize,true);
  108. end
  109. else
  110. if not oper.SetupVar(tempstr,false) then
  111. Message1(sym_e_unknown_id,tempstr);
  112. { record.field ? }
  113. if actasmtoken=AS_DOT then
  114. begin
  115. BuildRecordOffsetSize(tempstr,l,k,mangledname,false);
  116. if (mangledname<>'') then
  117. Message(asmr_e_invalid_reference_syntax);
  118. inc(oper.opr.ref.offset,l);
  119. end;
  120. end;
  121. Procedure tz80attreader.BuildReference(oper : tz80operand);
  122. procedure Consume_RParen;
  123. begin
  124. if actasmtoken<>AS_RPAREN then
  125. Begin
  126. Message(asmr_e_invalid_reference_syntax);
  127. RecoverConsume(true);
  128. end
  129. else
  130. begin
  131. Consume(AS_RPAREN);
  132. if not (actasmtoken in [AS_COMMA,AS_SEPARATOR,AS_END]) then
  133. Begin
  134. Message(asmr_e_invalid_reference_syntax);
  135. RecoverConsume(true);
  136. end;
  137. end;
  138. end;
  139. procedure read_index;
  140. begin
  141. Consume(AS_COMMA);
  142. if actasmtoken=AS_REGISTER then
  143. Begin
  144. oper.opr.ref.index:=actasmregister;
  145. Consume(AS_REGISTER);
  146. end
  147. else if actasmtoken=AS_HASH then
  148. begin
  149. Consume(AS_HASH);
  150. inc(oper.opr.ref.offset,BuildConstExpression(false,true));
  151. end;
  152. end;
  153. begin
  154. Consume(AS_LPAREN);
  155. if actasmtoken=AS_REGISTER then
  156. begin
  157. oper.opr.ref.base:=actasmregister;
  158. Consume(AS_REGISTER);
  159. { can either be a register or a right parenthesis }
  160. { (reg) }
  161. if actasmtoken=AS_LPAREN then
  162. Begin
  163. Consume_RParen;
  164. exit;
  165. end;
  166. if actasmtoken=AS_PLUS then
  167. begin
  168. consume(AS_PLUS);
  169. oper.opr.ref.addressmode:=AM_POSTINCREMENT;
  170. end;
  171. end {end case }
  172. else
  173. Begin
  174. Message(asmr_e_invalid_reference_syntax);
  175. RecoverConsume(false);
  176. end;
  177. end;
  178. Procedure tz80attreader.BuildOperand(oper : tz80operand);
  179. var
  180. expr : string;
  181. typesize,l : aint;
  182. procedure AddLabelOperand(hl:tasmlabel);
  183. begin
  184. if not(actasmtoken in [AS_PLUS,AS_MINUS,AS_LPAREN]) { and
  185. is_calljmp(actopcode) } then
  186. begin
  187. oper.opr.typ:=OPR_SYMBOL;
  188. oper.opr.symbol:=hl;
  189. end
  190. else
  191. begin
  192. oper.InitRef;
  193. oper.opr.ref.symbol:=hl;
  194. end;
  195. end;
  196. procedure MaybeRecordOffset;
  197. var
  198. mangledname: string;
  199. hasdot : boolean;
  200. l,
  201. toffset,
  202. tsize : aint;
  203. begin
  204. if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
  205. exit;
  206. l:=0;
  207. mangledname:='';
  208. hasdot:=(actasmtoken=AS_DOT);
  209. if hasdot then
  210. begin
  211. if expr<>'' then
  212. begin
  213. BuildRecordOffsetSize(expr,toffset,tsize,mangledname,false);
  214. if (oper.opr.typ<>OPR_CONSTANT) and
  215. (mangledname<>'') then
  216. Message(asmr_e_wrong_sym_type);
  217. inc(l,toffset);
  218. oper.SetSize(tsize,true);
  219. end;
  220. end;
  221. if actasmtoken in [AS_PLUS,AS_MINUS] then
  222. inc(l,BuildConstExpression(true,false));
  223. case oper.opr.typ of
  224. OPR_LOCAL :
  225. begin
  226. { don't allow direct access to fields of parameters, because that
  227. will generate buggy code. Allow it only for explicit typecasting }
  228. if hasdot and
  229. (not oper.hastype) and
  230. (tabstractnormalvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
  231. (current_procinfo.procdef.proccalloption<>pocall_register) then
  232. Message(asmr_e_cannot_access_field_directly_for_parameters);
  233. inc(oper.opr.localsymofs,l)
  234. end;
  235. OPR_CONSTANT :
  236. inc(oper.opr.val,l);
  237. OPR_REFERENCE :
  238. if (mangledname<>'') then
  239. begin
  240. if (oper.opr.val<>0) then
  241. Message(asmr_e_wrong_sym_type);
  242. oper.opr.typ:=OPR_SYMBOL;
  243. oper.opr.symbol:=current_asmdata.RefAsmSymbol(mangledname,AT_FUNCTION);
  244. end
  245. else
  246. inc(oper.opr.val,l);
  247. OPR_SYMBOL:
  248. Message(asmr_e_invalid_symbol_ref);
  249. else
  250. internalerror(200309221);
  251. end;
  252. end;
  253. function MaybeBuildReference:boolean;
  254. { Try to create a reference, if not a reference is found then false
  255. is returned }
  256. begin
  257. MaybeBuildReference:=true;
  258. case actasmtoken of
  259. AS_INTNUM,
  260. AS_MINUS,
  261. AS_PLUS:
  262. Begin
  263. oper.opr.ref.offset:=BuildConstExpression(True,False);
  264. if actasmtoken<>AS_LPAREN then
  265. Message(asmr_e_invalid_reference_syntax)
  266. else
  267. BuildReference(oper);
  268. end;
  269. AS_LPAREN:
  270. BuildReference(oper);
  271. AS_ID: { only a variable is allowed ... }
  272. Begin
  273. ReadSym(oper);
  274. case actasmtoken of
  275. AS_END,
  276. AS_SEPARATOR,
  277. AS_COMMA: ;
  278. AS_LPAREN:
  279. BuildReference(oper);
  280. else
  281. Begin
  282. Message(asmr_e_invalid_reference_syntax);
  283. Consume(actasmtoken);
  284. end;
  285. end; {end case }
  286. end;
  287. else
  288. MaybeBuildReference:=false;
  289. end; { end case }
  290. end;
  291. var
  292. tempreg : tregister;
  293. ireg : tsuperregister;
  294. hl : tasmlabel;
  295. ofs : longint;
  296. registerset : tcpuregisterset;
  297. tempstr : string;
  298. tempsymtyp : tasmsymtype;
  299. Begin
  300. expr:='';
  301. case actasmtoken of
  302. AS_LBRACKET: { Memory reference or constant expression }
  303. Begin
  304. oper.InitRef;
  305. BuildReference(oper);
  306. end;
  307. AS_INTNUM,
  308. AS_MINUS,
  309. AS_PLUS:
  310. Begin
  311. if (actasmtoken=AS_MINUS) and
  312. (actopcode in [A_LD,A_ST]) then
  313. begin
  314. { Special handling of predecrement addressing }
  315. oper.InitRef;
  316. oper.opr.ref.addressmode:=AM_PREDRECEMENT;
  317. consume(AS_MINUS);
  318. if actasmtoken=AS_REGISTER then
  319. begin
  320. oper.opr.ref.base:=actasmregister;
  321. consume(AS_REGISTER);
  322. end
  323. else
  324. begin
  325. Message(asmr_e_invalid_reference_syntax);
  326. RecoverConsume(false);
  327. end;
  328. end
  329. else
  330. begin
  331. { Constant memory offset }
  332. { This must absolutely be followed by ( }
  333. oper.InitRef;
  334. oper.opr.ref.offset:=BuildConstExpression(True,False);
  335. { absolute memory addresss? }
  336. if actopcode in [A_LDS,A_STS] then
  337. BuildReference(oper)
  338. else
  339. begin
  340. ofs:=oper.opr.ref.offset;
  341. BuildConstantOperand(oper);
  342. inc(oper.opr.val,ofs);
  343. end;
  344. end;
  345. end;
  346. AS_ID: { A constant expression, or a Variable ref. }
  347. Begin
  348. if (actasmpattern='LO8') or (actasmpattern='HI8') then
  349. begin
  350. { Low or High part of a constant (or constant
  351. memory location) }
  352. oper.InitRef;
  353. if actasmpattern='LO8' then
  354. oper.opr.ref.refaddr:=addr_lo8
  355. else
  356. oper.opr.ref.refaddr:=addr_hi8;
  357. Consume(actasmtoken);
  358. Consume(AS_LPAREN);
  359. BuildConstSymbolExpression(false, true,false,l,tempstr,tempsymtyp);
  360. if not assigned(oper.opr.ref.symbol) then
  361. oper.opr.ref.symbol:=current_asmdata.RefAsmSymbol(tempstr,tempsymtyp)
  362. else
  363. Message(asmr_e_cant_have_multiple_relocatable_symbols);
  364. case oper.opr.typ of
  365. OPR_CONSTANT :
  366. inc(oper.opr.val,l);
  367. OPR_LOCAL :
  368. inc(oper.opr.localsymofs,l);
  369. OPR_REFERENCE :
  370. inc(oper.opr.ref.offset,l);
  371. else
  372. internalerror(200309202);
  373. end;
  374. Consume(AS_RPAREN);
  375. end
  376. { Local Label ? }
  377. else if is_locallabel(actasmpattern) then
  378. begin
  379. CreateLocalLabel(actasmpattern,hl,false);
  380. Consume(AS_ID);
  381. AddLabelOperand(hl);
  382. end
  383. { Check for label }
  384. else if SearchLabel(actasmpattern,hl,false) then
  385. begin
  386. Consume(AS_ID);
  387. AddLabelOperand(hl);
  388. end
  389. else
  390. { probably a variable or normal expression }
  391. { or a procedure (such as in CALL ID) }
  392. Begin
  393. { is it a constant ? }
  394. if SearchIConstant(actasmpattern,l) then
  395. Begin
  396. if not (oper.opr.typ in [OPR_NONE,OPR_CONSTANT]) then
  397. Message(asmr_e_invalid_operand_type);
  398. BuildConstantOperand(oper);
  399. end
  400. else
  401. begin
  402. expr:=actasmpattern;
  403. Consume(AS_ID);
  404. { typecasting? }
  405. if (actasmtoken=AS_LPAREN) and
  406. SearchType(expr,typesize) then
  407. begin
  408. oper.hastype:=true;
  409. Consume(AS_LPAREN);
  410. BuildOperand(oper);
  411. Consume(AS_RPAREN);
  412. if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
  413. oper.SetSize(typesize,true);
  414. end
  415. else
  416. begin
  417. if not(oper.SetupVar(expr,false)) then
  418. Begin
  419. { look for special symbols ... }
  420. if expr= '__HIGH' then
  421. begin
  422. consume(AS_LPAREN);
  423. if not oper.setupvar('high'+actasmpattern,false) then
  424. Message1(sym_e_unknown_id,'high'+actasmpattern);
  425. consume(AS_ID);
  426. consume(AS_RPAREN);
  427. end
  428. else
  429. if expr = '__RESULT' then
  430. oper.SetUpResult
  431. else
  432. if expr = '__SELF' then
  433. oper.SetupSelf
  434. else
  435. if expr = '__OLDEBP' then
  436. oper.SetupOldEBP
  437. else
  438. Message1(sym_e_unknown_id,expr);
  439. end;
  440. end;
  441. end;
  442. if actasmtoken=AS_DOT then
  443. MaybeRecordOffset;
  444. { add a constant expression? }
  445. if (actasmtoken=AS_PLUS) then
  446. begin
  447. l:=BuildConstExpression(true,false);
  448. case oper.opr.typ of
  449. OPR_CONSTANT :
  450. inc(oper.opr.val,l);
  451. OPR_LOCAL :
  452. inc(oper.opr.localsymofs,l);
  453. OPR_REFERENCE :
  454. inc(oper.opr.ref.offset,l);
  455. else
  456. internalerror(200309202);
  457. end;
  458. end
  459. end;
  460. { Do we have a indexing reference, then parse it also }
  461. if actasmtoken=AS_LPAREN then
  462. BuildReference(oper);
  463. end;
  464. { Register, a variable reference or a constant reference }
  465. AS_REGISTER:
  466. Begin
  467. { save the type of register used. }
  468. tempreg:=actasmregister;
  469. Consume(AS_REGISTER);
  470. if (actasmtoken=AS_PLUS) then
  471. begin
  472. oper.opr.typ:=OPR_REFERENCE;
  473. reference_reset_base(oper.opr.ref,tempreg,0,1,[]);
  474. oper.opr.ref.addressmode:=AM_POSTINCREMENT;
  475. consume(AS_PLUS);
  476. end
  477. else if (actasmtoken in [AS_END,AS_SEPARATOR,AS_COMMA]) then
  478. Begin
  479. if not (oper.opr.typ in [OPR_NONE,OPR_REGISTER]) then
  480. Message(asmr_e_invalid_operand_type);
  481. oper.opr.typ:=OPR_REGISTER;
  482. oper.opr.reg:=tempreg;
  483. end
  484. else
  485. Message(asmr_e_syn_operand);
  486. end;
  487. AS_END,
  488. AS_SEPARATOR,
  489. AS_COMMA: ;
  490. else
  491. Begin
  492. Message(asmr_e_syn_operand);
  493. Consume(actasmtoken);
  494. end;
  495. end; { end case }
  496. end;
  497. {*****************************************************************************
  498. tz80attreader
  499. *****************************************************************************}
  500. procedure tz80attreader.BuildOpCode(instr : tz80instruction);
  501. var
  502. operandnum : longint;
  503. Begin
  504. { opcode }
  505. if (actasmtoken<>AS_OPCODE) then
  506. Begin
  507. Message(asmr_e_invalid_or_missing_opcode);
  508. RecoverConsume(true);
  509. exit;
  510. end;
  511. { Fill the instr object with the current state }
  512. with instr do
  513. begin
  514. Opcode:=ActOpcode;
  515. condition:=ActCondition;
  516. end;
  517. { We are reading operands, so opcode will be an AS_ID }
  518. operandnum:=1;
  519. Consume(AS_OPCODE);
  520. { Zero operand opcode ? }
  521. if actasmtoken in [AS_SEPARATOR,AS_END] then
  522. begin
  523. operandnum:=0;
  524. exit;
  525. end;
  526. { Read the operands }
  527. repeat
  528. case actasmtoken of
  529. AS_COMMA: { Operand delimiter }
  530. Begin
  531. if operandnum>Max_Operands then
  532. Message(asmr_e_too_many_operands)
  533. else
  534. Inc(operandnum);
  535. Consume(AS_COMMA);
  536. end;
  537. AS_SEPARATOR,
  538. AS_END : { End of asm operands for this opcode }
  539. begin
  540. break;
  541. end;
  542. else
  543. BuildOperand(instr.Operands[operandnum] as tz80operand);
  544. end; { end case }
  545. until false;
  546. instr.Ops:=operandnum;
  547. end;
  548. function tz80attreader.is_asmopcode(const s: string):boolean;
  549. const
  550. { sorted by length so longer postfixes will match first }
  551. postfix2strsorted : array[1..19] of string[2] = (
  552. 'EP','SB','BT','SH',
  553. 'IA','IB','DA','DB','FD','FA','ED','EA',
  554. 'B','D','E','P','T','H','S');
  555. var
  556. len,
  557. j,
  558. sufidx : longint;
  559. hs : string;
  560. maxlen : longint;
  561. icond : tasmcond;
  562. Begin
  563. { making s a value parameter would break other assembler readers }
  564. hs:=s;
  565. is_asmopcode:=false;
  566. { clear op code }
  567. actopcode:=A_None;
  568. actcondition:=C_None;
  569. { first, handle B else BLS is read wrong }
  570. if ((copy(hs,1,2)='BR') and (length(hs)=4)) then
  571. begin
  572. for icond:=low(tasmcond) to high(tasmcond) do
  573. begin
  574. if copy(hs,2,3)=uppercond2str[icond] then
  575. begin
  576. actopcode:=A_BRxx;
  577. actasmtoken:=AS_OPCODE;
  578. actcondition:=icond;
  579. is_asmopcode:=true;
  580. exit;
  581. end;
  582. end;
  583. end;
  584. maxlen:=max(length(hs),5);
  585. actopcode:=A_NONE;
  586. for j:=maxlen downto 1 do
  587. begin
  588. actopcode:=tasmop(PtrUInt(iasmops.Find(copy(hs,1,j))));
  589. if actopcode<>A_NONE then
  590. begin
  591. actasmtoken:=AS_OPCODE;
  592. { strip op code }
  593. delete(hs,1,j);
  594. break;
  595. end;
  596. end;
  597. if actopcode=A_NONE then
  598. exit;
  599. { search for condition, conditions are always 2 chars }
  600. if length(hs)>1 then
  601. begin
  602. for icond:=low(tasmcond) to high(tasmcond) do
  603. begin
  604. if copy(hs,1,2)=uppercond2str[icond] then
  605. begin
  606. actcondition:=icond;
  607. { strip condition }
  608. delete(hs,1,2);
  609. break;
  610. end;
  611. end;
  612. end;
  613. { if we stripped all postfixes, it's a valid opcode }
  614. is_asmopcode:=length(hs)=0;
  615. end;
  616. procedure tz80attreader.ConvertCalljmp(instr : tz80instruction);
  617. var
  618. newopr : toprrec;
  619. begin
  620. if instr.Operands[1].opr.typ=OPR_REFERENCE then
  621. begin
  622. newopr.typ:=OPR_SYMBOL;
  623. newopr.symbol:=instr.Operands[1].opr.ref.symbol;
  624. newopr.symofs:=instr.Operands[1].opr.ref.offset;
  625. if (instr.Operands[1].opr.ref.base<>NR_NO) or
  626. (instr.Operands[1].opr.ref.index<>NR_NO) then
  627. Message(asmr_e_syn_operand);
  628. instr.Operands[1].opr:=newopr;
  629. end;
  630. end;
  631. procedure tz80attreader.handleopcode;
  632. var
  633. instr : tz80instruction;
  634. begin
  635. instr:=tz80instruction.Create(tz80operand);
  636. BuildOpcode(instr);
  637. { if is_calljmp(instr.opcode) then
  638. ConvertCalljmp(instr); }
  639. {
  640. instr.AddReferenceSizes;
  641. instr.SetInstructionOpsize;
  642. instr.CheckOperandSizes;
  643. }
  644. instr.ConcatInstruction(curlist);
  645. instr.Free;
  646. end;
  647. {*****************************************************************************
  648. Initialize
  649. *****************************************************************************}
  650. const
  651. asmmode_z80_att_info : tasmmodeinfo =
  652. (
  653. id : asmmode_z80_gas;
  654. idtxt : 'GAS';
  655. casmreader : tz80attreader;
  656. );
  657. asmmode_z80_standard_info : tasmmodeinfo =
  658. (
  659. id : asmmode_standard;
  660. idtxt : 'STANDARD';
  661. casmreader : tz80attreader;
  662. );
  663. initialization
  664. RegisterAsmMode(asmmode_z80_att_info);
  665. RegisterAsmMode(asmmode_z80_standard_info);
  666. end.