Download Merlin 128 manual

Transcript
Merlin 128 User's Manual
Sourceror
DEALING WITH THE FINISHED SOURCE
In most cases, after you have some experience and assuming you used reasonable care, the
source will have few, if any, defects.
You may notice that some DA's would have been more appropriate in the DA LABEL-1 or
the DDB LABEL formats. In this, and similar cases, it may be best to do the disassembly
again with some notes in hand. The disassembly is so quick and painless, that it is often
much easier than trying to alter the source directly.
The source will have all the exterior or otherwise unrecognized labels at the end in a table of
equates. You should look at this table closely. It should not contain any zero page equates
except ones resulting from DA's, JMP's or JSR's. This is almost a sure sign of an error in the
disassembly (yours, not SOURCEROR's). It may have resulted from an attempt to
disassemble a data area as regular code.
NOTE: If you try to assemble the source under these conditions, you will get an error as
soon as the equates appear. If, as eventually you should, you move the equates to the start of
the program, you will not get an error, but the assembly may not be correct.
It is important to deal with this situation first as trouble could occur if, for example, the
disassembler finds the data AD008D. It will disassemble it correctly, as LDA $008D. The
assembler always assembles this code as a zero page instruction, giving the two bytes A5
8D. Occasionally you will find a program that uses this form for a zero page instruction. In
that case, you will have to insert a character after the LDA opcode to have it assemble
identically to its original form. Often it was data in the first place rather than code, and must
be dealt with to get a correct assembly.
The Memory Full Message
When the source file reaches within $600 bytes of the end of its available space you will see
MEMORY FULL and "HIT A KEY". When you hit a key, SOURCEROR will go directly to
the final processing. The reason for the $600 byte gap is that SOURCEROR needs a certain
amount of space for this processing. There is a "secret" override provision at the memory
full point. If the key you press is CTRL-O (for override), then SOURCEROR will return for
another command. You can use this to specify the desired ending point. You can also use it
to go a little further than SOURCEROR wants you to, and disassemble a few more lines.
Obviously, you should not carry this to extremes. If you get too close to the end of available
space, Sourceror will no longer accept this override and will automatically start the final
processing.
Page 118