Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site anasazi.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!noao!terak!mot!anasazi!duane From: duane@anasazi.UUCP (Duane Morse) Newsgroups: net.sources Subject: z80dis.c bug fix & small enhancement Message-ID: <394@anasazi.UUCP> Date: Mon, 9-Dec-85 10:55:30 EST Article-I.D.: anasazi.394 Posted: Mon Dec 9 10:55:30 1985 Date-Received: Wed, 11-Dec-85 21:53:04 EST Distribution: net Organization: Anasazi, Phoenix Az. Lines: 35 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