浏览代码

+ support the RST instruction in the Z80 internal asm writer

git-svn-id: trunk@45279 -
nickysn 5 年之前
父节点
当前提交
0a09359906
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      compiler/z80/aasmcpu.pas

+ 10 - 0
compiler/z80/aasmcpu.pas

@@ -763,6 +763,16 @@ implementation
                     internalerror(2020050605);
                 end;
               end;
+            'ppp':
+              begin
+                for i:=0 to insentry^.ops-1 do
+                  if insentry^.optypes[i]=OT_IMM_RST then
+                    begin
+                      if oper[i]^.typ<>top_const then
+                        internalerror(2020050606);
+                      result:=Byte(oper[i]^.val shr 3) and $07;
+                    end;
+              end;
             else
               internalerror(2020050409);
           end;