SAD (disassembler) - Update

This is where the BIN Hackers and definition junkies discuss the inner workings of the EEC code and hardware. General tuning questions do not go here. Only technical/hardware-specific/code questions and discussions belong here.

Moderators: cgrey8, EDS50, Jon 94GT, 2Shaker

jsa
Tuning Addict
Posts: 519
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: SAD (disassembler) - Update

Post by jsa » Wed Dec 13, 2017 4:02 am

[CF75] contains a value of 1sec

and SAD shows its use like this

Code: Select all

b1d3: d3,03             jnc   b1d8           if ((uns) 0 < cf75) goto b1d8;
I am thinking it should be

Code: Select all

b1d3: d3,03             jnc   b1d8           if ((uns) 0 < [cf75]) goto b1d8;
Like

Code: Select all

b1f0: d9,0b             jgtu  b1fd           if ((uns) Rbe > [cf7f] ) goto b1fd
Cheers

John

95 Escort RS Cosworth - GHAJ0 / ANTI on a COSY box code
Moates QH & BE
ForDiag

sailorbob
BIN Hacker
Posts: 1650
Joined: Tue Jul 12, 2005 6:10 am

Re: SAD (disassembler) - Update

Post by sailorbob » Wed Dec 13, 2017 6:20 am

The jnc is jumping according to the state of the carry flag, the state of which is determined by what's happened in the subroutine at 0x0x8099 not the contents of 0xCF75.
Last edited by sailorbob on Sun Dec 17, 2017 3:16 am, edited 1 time in total.

jsa
Tuning Addict
Posts: 519
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: SAD (disassembler) - Update

Post by jsa » Wed Dec 13, 2017 9:13 pm

My query is not about the reason for the jump, but SAD not applying a defined symbol.

Here's an example without jump.

Directive contains

Code: Select all

SYM c20a "SomeSym"
SAD outputs

Code: Select all

be9b: 45,46,00,f2,38    ad3w  R38,Rf2,46     R38 = c20a;
bea0: ef,fb,b9          call  789e           STabLU();
This would be consistent with other opcodes

Code: Select all

be9b: 45,46,00,f2,38    ad3w  R38,Rf2,46     R38 = SomeSym;
bea0: ef,fb,b9          call  789e           STabLU();
Cheers

John

95 Escort RS Cosworth - GHAJ0 / ANTI on a COSY box code
Moates QH & BE
ForDiag

sailorbob
BIN Hacker
Posts: 1650
Joined: Tue Jul 12, 2005 6:10 am

Re: SAD (disassembler) - Update

Post by sailorbob » Thu Dec 14, 2017 9:59 am

I don't think you can realistically expect the disassembler to apply a symbol, or an address, in line 0xB1D3 as it does not know what state the carry flag will be in after the subroutine at 0x8099 has been executed (and would not know unless it simulated the code running with values for the various times and temperatures the routine uses).
Last edited by sailorbob on Sun Dec 17, 2017 3:15 am, edited 1 time in total.

jsa
Tuning Addict
Posts: 519
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: SAD (disassembler) - Update

Post by jsa » Thu Dec 14, 2017 2:16 pm

SAD recognises the lookup subroutines and outputs the row and column registers to the msg file. So why not do that for the address input register, r38 in this case, then step back through the code to the previous R38= to nail the address and apply the symbol.
Cheers

John

95 Escort RS Cosworth - GHAJ0 / ANTI on a COSY box code
Moates QH & BE
ForDiag

sailorbob
BIN Hacker
Posts: 1650
Joined: Tue Jul 12, 2005 6:10 am

Re: SAD (disassembler) - Update

Post by sailorbob » Thu Dec 14, 2017 3:09 pm

If you look at the subroutine at 0x8099 you'll see that the value in the entry address passed by 0x30 is not necessarily the one that gets used to determine the state of the carry flag. The following four addresses also get used in the subroutine.

tvrfan
Tuning Addict
Posts: 368
Joined: Sat May 14, 2011 11:41 pm
Location: New Zealand

Re: SAD (disassembler) - Update

Post by tvrfan » Thu Feb 15, 2018 4:28 pm

-- BUMP --

Just pushing this title to the top to let everyone know that the latest version of SAD is now posted to Github, and has source code,
exe for Windows and 64 bit linux, and (should) have all reported bugs fixed...

I have not changed the command structure so all existing directive files, comment files etc should work just as before (unless I've introduced a bug somewhere). Download address in my sig below.....
TVR, Triumph (cars), kit cars, classics. Ex IT geek, development and databases.

https://github.com/tvrfan/EEC-IV-disassembler

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests