浏览代码

+ support the 'in A,(n)' and 'out (n),A' instrunction in the Z80 internal asm writer

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

+ 14 - 0
compiler/z80/aasmcpu.pas

@@ -560,6 +560,20 @@ implementation
                     else
                       InternalError(2020050506);
                   end;
+                end
+              else if insentry^.optypes[i]=OT_IMM_PORT then
+                begin
+                  case oper[i]^.typ of
+                    top_ref:
+                      begin
+                        if (oper[i]^.ref^.base<>NR_NO) or (oper[i]^.ref^.index<>NR_NO) or Assigned(oper[i]^.ref^.symbol) then
+                          internalerror(2020050612);
+                        WriteByte(Byte(oper[i]^.ref^.offset));
+                        exit;
+                      end;
+                    else
+                      InternalError(2020050611);
+                  end;
                 end;
             end;
           InternalError(2020050505);