소스 검색

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

git-svn-id: branches/z80@44525 -
nickysn 5 년 전
부모
커밋
e04d2acd6c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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;