68HC11 Disassembler

Donald Whisnant dewhisna at ix.netcom.com
Wed Oct 23 05:07:05 GMT 1996


For those of you using my 68hc11 disassembler who have been experiencing
an "error opening source file" problem.  This is actually a "phantom" error.
In other words, it WILL appear when there really is a problem opening the
source file, BUT, it can also occur when there is a problem with the opcodes
file (i.e. the M6811DIS.OP file)...  The is because the I/O checking done by
the compiler was disabled (intentionally) to allow for checking within the
program.  The disassembler reads the source file immediately after the
opcodes file.  However, the only error checking done with the opcodes file is
while opening the file -- not while reading it.  At the start of reading the
source file, the I/O error flag variable is not reset --- in other words,
if there is an error while reading the opcodes, it may trigger the "error
opening source" since that is the next error check point.  

To resolve this, make sure that your M6811DIS.OP file is not corrupt.  The
file is in the format of:  n op(1) op(2) ... op(n) grp ctrl mnemonic
Example: 2 24 29 9 0 bclr   ... The "n" (2 in this example) is the number
of "fixed bytes" for the opcode.  The "24" and "29" are the fixed byte
values --- 2 as specified by the "2".  The "9" (or group value) tells the
disassembler how to interpret any operand values (additional opcode bytes)
and the "0" (or control value) tells the disassembler how to act upon
the opcode (i.e. jump address, data address, continue/discontinue, etc). And
of course the "bclr" is the mnemonic...  ***The last line in the file should
be a single "0" for the "n" -- telling the disassembler that all opcodes
are complete.***  If this "0" is missing OR if there is any other values 
missing -- a read past end of file will result and possibly cause the "source
file error"...

Strict error checking was not performed in the program since the opcodes
file is not a user generated file -- however, it appears that this file has
gotten occasionally mangled in email transfer and has kept several people from
being able to use the disassembler...   If you need me to resend the opcode
file to you, email me privately...    .......  Future versions will
incorporate tighter i/o error checking...

Donald Whisnant
dewhisna at ix.netcom.com




More information about the Diy_efi mailing list