Page 1 of 1

Disassembler by Brian Cadge

Posted: Thu Nov 14, 2013 10:16 pm
by Alastair
This download contains three versions of Brian Cadge's disassembler. Version 1 was printed in Your Computer (May 1983, Vol. 3 No. 5, p. 119-122), see the Internet Archive or WoS (pages 119, 120, 121, and 122). The eagle-eyed will note that the listing is not exactly as it appears in Your Computer, the corrections and additional lines (552 and 555 - I have kept, but commented out, Brian Cadge's original line 550) come from a letter by Stephen Hunter printed in Your Computer (July 1983, Vol. 3 No. 7, p. 40, which neither the Internet Archive nor World of Spectrum currently possess).

Version 2 appears in the book Introducing Dragon Machine Code by Ian Sinclair. The author modified the original (with the permission of Brian Cadge and using Stephen Hunter's corrections) creating a program where, unlike the original, starting addresses are entered in hex and disassembly continues until the break key is pressed. The program shows or prints a few lines of disassembled code at a time, to advance through the disassembly press any key other than break. With reference to the listing in the book, I have corrected erroneous entries such as "LDA A" and removed a bug by inserting an extra comma in line 930 (between "ADD B #" and "LDD %").

Then there is the version I created! Version 3 takes the start and finish address input from v1, but uses hex values, combines it with the hex output of v2 and adds the ability to disassemble more addresses without the need of running the program again.

Not only does the download contain three versions of the disassembler but it also contains a .cas and .bas file of each version. A bug in the original Dragon ROMs [correction of an incorrect statement] when importing .bas files causes long lines to be truncated, so if you do import one of these .bas files you must edit the problem lines (900 and 930 in v1, 860 and 890 in v2 and v3) and append the missing characters.

I have not comprehensively tested these programs, so be aware that they may still contain errors.

Re: Disassembler by Brian Cadge

Posted: Wed Dec 18, 2013 5:25 pm
by zephyr
Alastair wrote: A bug in current versions of XRoar when importing .bas files causes long lines to be truncated, so if you do import one of these .bas files you must edit the problem lines (900 and 930 in v1, 860 and 890 in v2 and v3) and append the missing characters.
This problem is caused by a bug in the original Dragon 32 and 64 BASIC ROMs. The bug has been fixed by Steve Woolham in his latest Enhanced ROMs v3.1 release.

Re: Disassembler by Brian Cadge

Posted: Thu Dec 19, 2013 12:54 am
by Alastair
zephyr wrote:This problem is caused by a bug in the original Dragon 32 and 64 BASIC ROMs.
You're right, I should have corrected the post.