Re: A86: Re: link port emulation


[Prev][Next][Index][Thread]

Re: A86: Re: link port emulation




Assembly Studio 8x has the option to export program symbols to an include
type of file.  I'm sure tasm has a similiar option, but I didn't test it,
didn't even have tasm on my machine at that time.  Kind of irrelevant now I
guess :)  But anyway, there was an option to load symbols, basically a mini
assembler that would parse the filem, get the value of all the symbols used
in the program and load them into an array.  It could be sped up a lot by
using hash tables, but I just went with the built in VTI structure.  VTI
already has symbolic debugging of sorts, but only for the ROM, and all the
calls are hard coded.  This just replaced the hard coded symbols with the
ones that were loaded by the user.  I think there were some other changes to
be made to make it work, but it wasn't very difficult to get it all working.
Rusty's code looks messy and isn't always the most efficient way of doing
things, but I am amazed everytime I work with it, many times what seems to
be messy is just me not fully comprehending the genious of it (and other
times it is messy, because he threw together those 300 lines of code in ten
minutes and never cared to clean it up).

I added some other things, like a go to symbol dialog in addition to go to
address, that made working with stuff really easy.  The dissassembly wasn't
always perfect, such as when you would have two symbols with the same value,
it wouldn't always display the one you'd expect (probably whatever came
first in the array).  And then loading all symbols from a program wasn't
necessarily good, since it's not true symbolic debugging (needs to use
something like list files, I don't know if list is the right type off-hard,
I don't use tasm).  You get things like the symbols for key codes being
displayed instead of literals, perhaps an option not to translate symbols
less than 256 would be good.  Oh yes, I had to do some tweaking of the
displaying of symbols not as labels, such as "ld hl,label".  It didn't work
with relative jumps, and probably some other stuff, at least not completely
correct.  But the simple hack made the debugger display look very similiar
to the original source code.  Too bad we never got that IDE with color
coding and integrated debugger finished, now that would be a fun project to
work on again.

Please forgive the rambling nature of this post...it has been a long day at
work :)

> symbolic debugging?  how'd that work?  i was wanting to add something
> like that too.





References: