[net.sources] z80dis.c bug fix & small enhancement

duane@anasazi.UUCP (Duane Morse) (12/09/85)

I discovered that my z80dis.c (z80 disassembler) had a small bug in
handling jump relative instructions. Routine dorela wasn't being used
properly, and this results (sometimes) in garbage being displayed on
a jump relative instruction. I fixed this.

While I was in this area anyway, I changed the code to display the full
address on a jump relative instead of a plus or minus offset.
----------------------SCCSDIFF for z80dis.c (r1.1 to r1.2)------------
463c463
<   dorela();
---
>   dorela(NULL);
485a486
>   unsigned short addr;
488c489,490
<   sout(s);
---
>   if (s != NULL)
>     sout(s);
492,498c494,496
<   if (offset < 0) {
<     offset = -offset;
<     sout(".-");
<   }
<   else
<     sout(".+");
<   hex2(offset);
---
>   addr = labeladdr;
>   hex2(addr >> 8);
>   hex2(addr);
-- 

Duane Morse	...!noao!{terak|mot}!anasazi!duane
(602) 870-3330