Browse Source

+ emit references with negative offsets correctly in the sdcc-sdasz80 asm output

git-svn-id: branches/z80@44525 -
nickysn 5 years ago
parent
commit
e04d2acd6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/z80/agsdasz80.pas

+ 2 - 2
compiler/z80/agsdasz80.pas

@@ -347,9 +347,9 @@ unit agsdasz80;
                   writer.AsmWrite(o.ref^.symbol.name);
                   need_plus:=true;
                 end;
-              if o.ref^.offset>0 then
+              if o.ref^.offset<>0 then
                 begin
-                  if need_plus then
+                  if need_plus and (o.ref^.offset>0) then
                     writer.AsmWrite('+');
                   writer.AsmWrite(tostr(o.ref^.offset));
                   need_plus:=true;