浏览代码

+ support signed 8-bit immediate constants in the Z80 internal asm writer as well

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

+ 1 - 1
compiler/z80/aasmcpu.pas

@@ -213,7 +213,7 @@ implementation
             OT_IMM3:
               result:=(oper.typ=top_const) and (oper.val>=0) and (oper.val<=7);
             OT_IMM8:
-              result:=((oper.typ=top_const) and (oper.val>=0) and (oper.val<=255)) or
+              result:=((oper.typ=top_const) and (oper.val>=-128) and (oper.val<=255)) or
                       ((oper.typ=top_ref) and
                        (oper.ref^.refaddr in [addr_hi8,addr_lo8]) and assigned(oper.ref^.symbol) and
                        (oper.ref^.base=NR_NO) and (oper.ref^.index=NR_NO));