Explorar o código

+ support the RST instruction in the Z80 internal asm writer

git-svn-id: trunk@45279 -
nickysn %!s(int64=5) %!d(string=hai) anos
pai
achega
0a09359906
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      compiler/z80/aasmcpu.pas

+ 10 - 0
compiler/z80/aasmcpu.pas

@@ -763,6 +763,16 @@ implementation
                     internalerror(2020050605);
                     internalerror(2020050605);
                 end;
                 end;
               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
             else
               internalerror(2020050409);
               internalerror(2020050409);
           end;
           end;