Browse Source

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

git-svn-id: trunk@45284 -
nickysn 5 years ago
parent
commit
0d402a1341
1 changed files with 1 additions and 1 deletions
  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));