Răsfoiți Sursa

+ support instructions like BIT, SET and RES in the Z80 internal asm writer

git-svn-id: trunk@45283 -
nickysn 5 ani în urmă
părinte
comite
11a7b8592f
1 a modificat fișierele cu 13 adăugiri și 1 ștergeri
  1. 13 1
      compiler/z80/aasmcpu.pas

+ 13 - 1
compiler/z80/aasmcpu.pas

@@ -822,6 +822,18 @@ implementation
                       result:=Byte(oper[i]^.val shr 3) and $07;
                     end;
               end;
+            'bbb':
+              begin
+                for i:=0 to insentry^.ops-1 do
+                  if insentry^.optypes[i]=OT_IMM3 then
+                    begin
+                      if oper[i]^.typ<>top_const then
+                        internalerror(2020050606);
+                      result:=Byte(oper[i]^.val) and $07;
+                    end;
+              end;
+            'bbbrrr':
+              result:=(EvalMaskCode('bbb') shl 3) or EvalMaskCode('rrr');
             else
               internalerror(2020050409);
           end;
@@ -850,7 +862,7 @@ implementation
                   bincode:=bincode+'1';
                   maskcode:=maskcode+'0';
                 end;
-              'p','d','r','q','c':
+              'p','d','r','q','c','b':
                 begin
                   bincode:=bincode+'0';
                   maskcode:=maskcode+token[i];