Unknown 8085 opcodes
dwight
dkelvey at hotmail.com
Wed Jan 11 12:48:23 CST 2017
I always go through the code and put a extra return after
each unconditional jump or return.
My disassemblers always make a list and count of addresses accessed
by any non-indirect reference. If I see a blank line in the code,
without any references, I get suspicious.
How can the code execute this location if it is never referenced??
I can then tell my assembler to treat that location differently.
I can tell it it is a DB field for instance.
I then rerun the disassembler again to see if it cleans things up.
It usually takes several passes to get things straightened out.
Any disassembler, worth playing with, has such directives.
As was mentioned, the disassembler has no way of knowing what
the bytes are there for. Say the code did some type of indirect
access into the table based on some value passed through a serial
port ( where 35-94 are the only valid values ). How would you expect the
disassembler to figure that out.
I was disassembling 4004 code a while back. I came on a number
of illegal operations( using my disassembler ).
It turned out that it was the use of an instruction that was unusual.
It was the conditional jump. If it had no condition, it would always
skip over the address ( next byte ) and not jump.
It was used as a SKIP instruction. It would allow a single byte to be
executed at the entry to a common routine. The address field was
an instruction for a different entry point, into the routine.
I added the SKIP to my disassembler [?]
Dwight
________________________________
From: cctalk <cctalk-bounces at classiccmp.org> on behalf of Tony Duell <ard.p850ug1 at gmail.com>
Sent: Wednesday, January 11, 2017 10:08:28 AM
To: General Discussion: On-Topic and Off-Topic Posts
Subject: Re: Unknown 8085 opcodes
On Wed, Jan 11, 2017 at 6:01 PM, Fred Cisin <cisin at xenosoft.com> wrote:
> Quite realistic would be for a disassembler that couldn't recognize an
> opcode to display it as
> DB 1A ; Esc
> DB 65 ; 'e'
> DB 09
I once used a disassembler (I can't remember for what CPU) that would
put a comment on each line giving the ascii character equivalents of the
bytes.
So you would get something like (totally ficticious instruction set) :
0100 48 65 6C ST R8 (656C) ; Hel
You (the user) could then decide if the instruction or text made more
sense. Of course it didn't help with, say floating point numbers, or RAD50
strings or...
> Code immediately following an unconditional JMP is likely to be data, but
> could just as easily be the destination of some other JMP, so a disassemble
> can't make assumptions.
>
> A disassembler does not convert bytes into code. It merely assists YOU in
> doing that.
Yes, like all tools, you have to think when you are using it.
-tony
More information about the cctalk
mailing list