Re: A83: 83 Disassembler


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

Re: A83: 83 Disassembler




You should realize too that not all ld rr,(xxxx) are reference to
data... I use them all the time to modify code to change semi-static cp
values to save clocks and bytes everytime it is tested. So... the moral
of the story is, well... i don't know

Jimmy Conner wrote:
> 
>   The disassembler was quite easy to write really (I
> have spent 3 days max on it so far), labels were
> incorporated early on and were not a problem. (They
> are named label1, ect..)  It already detects shell /
> modular programs, but doesn't do anything about it
> yet.
> 
>   The hardest part is with the .db 's   You can pretty
> much say that if the command is "ld rr, (xxxx)" then
> it is a .db/.dw (with a few exceptions)
> but it gets confusing with "ld rr, xxxx" that could be
> a .db or it could be code like this where you copy
> code to a place in memory.
> 
> ld hl, xxxx
> ld de, 8484h
> ld bc, 12
> ldir
> 
> The only thing that will solve part of this problem is
> to say if it is accessed with one of the many commands
> that can be used on .dbs and is not addressed in any
> other way, then it is a db.  Which is pretty simple
> but  will not always work.
> 
>   I make it output 2 files (3 if it was squished), the
> first has the format of regular sources but the second
> does like Linus mentioned (sorry Linus I did it before
> I read your email) to make it easy to debug, ect...
> 
> yyyy xx code    ; address data code
> 
> It sticks in all rom equates ect too so you don't have
> to look them up (call _htimesl, ect..)  Most programs
> without .db statements decompile flawlessly (squish,
> zasmload), the others decompile wierd but are fully
> recompilable the way they are. The .db statement just
> looks like a block of code.
> 
>   Hopefully 82 support will come next (basically just
> use a different inc file) then 83+ and possibly 85,
> ect...
> 
>   I haven't been around much since I have started
> working full time in January.  I also lost my internet
> connection but I still do quite a bit of programming
> and contemplating.
> 
> Jimmy Conner
> 
> --- Jkhum98@aol.com wrote:
> 
> > Hmm, those are some very good ideas, not something
> > that wll be fun to code
> > though, but i can see no other way to do it. You
> > should also detect if it's
> > shell compatible, and by the headers that we know,
> > turn that into .db and .dw
> > statements accordingly... That part about searching
> > for RET statements in
> > subroutines might not always work though. The
> > programmer could at any point
> > in there pop the return address of the stack and do
> > a jump if they wanted to.
> > You'd have to keep track of any other calls and
> > jumps in there.... Hmm, if
> > this program you are making is also going to be for
> > the 83+, that may get a
> > little messier, because on there you know that calls
> > to subroutines are a
> > macro of a Restart statement followed by the word
> > address of where to make
> > the call. I suppose in the process of displaying the
> > dissassembly for those,
> > you could just turn it into " bcall(Label)" whenever
> > you come to a RST $28
> > command... Well, this sounds like a cool program
> > though. So thats where youve
> > been for a while, making this... =P  Anyways, good
> > luck to ya on
> > incorporating the code to fix this problem, cya...
> >
> > Jason_K
> 
> =====
> »»»»»»»»»»»»»»»«««««««««««««««
> »      TIMagic@goatse.cx     «
> »  http://www.zed80asm.org   «
> » http://www.timagic.cjb.net «
> »»»»»»»»»»»»»»»«««««««««««««««
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com

-- 
Scott "_Wrath_" Dial
wrath@calc.org
ICQ#3608935
TimeCity Co-Lead Developer, AI - www.timecity.org
Member of TCPA - tcpa.calc.org
__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


Follow-Ups: References: