Dragon User


Author: Brian Cadge
Publisher: Pamcomms
Machine: Dragon 32

Published in Dragon User #043

Don't Dream Of Being Without It!

Sourcemaker, from Pamcomms Ltd, is based on such an obvious idea that I'm amazed nobody has thought of it before. Used in conjunction with Grosvenor's Dream range of assemblers it will disassemble machine code from ROM or RAM and produce output in a format suitable for loading into Dream.

The tape contains the control program Poker and several different versions of Sourcemaker to cover all configurations of the assembler - these are: Alldream cartridge, Alldream tape, Dream tape, Dream/Dreambug tape, Dskdream and a version for owners of DeltaDOS systems.

Instructions are included for transferring the software to disc (any DOS). Operation is simplicity itself; the Dream assembler is first loaded (or plugged in) as normal, then the POKER Basic program loaded, followed by the Sourcemaker machine code program. This is written in relocatable machine code and so can be loaded anywhere in RAM - its default position is at 3072 in the graphics area.

Running the program produces options to change the default CLEAR setting (usually set at 12001 by the user) and the Dream text table limit. The start address of the code to be converted is then entered and Sourcemaker gets to work. Conversion is carried out at a very high speed and a visual indication of what is going on is given on screen. The pseudo-source code output is stored directly into Dream's text table until it is full. To get to the pseudo-source code, Dream is then entered as usual (EXEC) and Old Text selected.

The source code is as near as possible to the original source code but data will be interpreted as instructions, Sourcemaker obviously cannot determine where the original FCBs etc were. This makes no difference to the validity of the code - BREAK-A will assemble the code producing exactly the same machine code as was disassembled.

Unlike some systems which use pseudo labels (e.g. L5FFF for a label at $5FFF) Sourcemaker uses the program counter and offset for all branches etc, producing source such as BRA *+10. Comment lines are included in the code, showing for example the ASCII character referred to in a load instruction such as LDA #42;'*'

The program intelligently tries to decide when it is better to output FCBs rather than a 6809 mnemonic to ensure that the assembled code will be exactly the same (byte for byte) as that disassembled. This overcomes the potential problem of Dream's use of 'Zero Register Offset'.

There must be countless uses of this program from modifying Basic on the Dragon 64 to changing commercial tape software to run on disc. If I had to make one criticism it is that code is disassembled until Dream's test table is full. This means that you have to enter Dream, mark and delete the code following that which you actually wanted to disassemble. This is simple enough, but it would have been nice to be able to specify the end address of the code to be converted.

Sourcemaker compliments the Dream package superbly and no Dream owner should be without it.

Brian Cadge

Other Dragon 32 Game Reviews By Brian Cadge

  • Alldream Front Cover
  • The Bells Front Cover
    The Bells
  • Diskfix Front Cover
  • Disk Support Tool 1.6 Front Cover
    Disk Support Tool 1.6
  • Sharebox Front Cover
  • Preston Budget Collection Front Cover
    Preston Budget Collection
  • Disk-Kit Front Cover
  • Cecil Plays 21 Front Cover
    Cecil Plays 21
  • Return Of The Ring Front Cover
    Return Of The Ring
  • Disc Doctor Front Cover
    Disc Doctor