JNC & AD2W Operand Clarity

Disassembly, Programming, Coding, Assembly, Binary information and all hacking discussions belong here.

JNC & AD2W Operand Clarity

Unread postby decipha » Thu Jul 12, 2018 3:49 pm

i was just ripping through gufb and I noticed something that caught my attention.

Code: Select all
<---PT Dashpot Code--->
5b76: a3,f4,60,42       ldw   R42,[Rf4+60]   tmp8l = DELHYS;
5b7a: 67,72,a6,42       ad2w  R42,[R72+a6]   tmp8l += RATCH;       
5b7e: d3,03             jnc   5b83           if ((uns) tmp8l >= RATCH)  {   // how could this ever be false?


Looks pretty straight forward, DELHYS is loaded to the scratch register. r42 == .06

ratch is then added to it, makes perfect sense thus far. DELHYS + RATCH (1.0) ; r42 == 1.06

then the sum is compared to ratch???

hmm lets see

is 1.06 > or == to 1.00 ??? well yes it is, any 3rd grader can tell you anytime you add a positive number to a positive number you end up with a larger number

considering both are unsigned words how could this ever switch? Looks like a one way ticket to me unless I'm missing something?

only thing i can think is that if the tps fails ratch is set to rativ, perhaps henrys gents didnt know this?

i just looked it up in RZASA and its the exact same code as well although its got the ETC_HP switch mixed in it, otherwise identical
User avatar
decipha
Tooner
 
Posts: 15323
Joined: Mon Jul 15, 2013 5:29 pm
Location: New Orleans, LA
Name: Michael Ponthieux
Vehicle Information: Supercoupin' x10
90 (4x 5spds) - Dante, Ruby, Daja, Ava
91 4r70w - Skarlett
92 (2x) 5spd & auto - Bianqa, Andrea
93 auto - Danika
94 5spd Rionda
95 auto Aisha
Vehicle 2 Information: Others:
00 Lincoln LS - Luanda
98 Camaro SS - Bounquisha
02 Harley F-150 - Sasasha
03 Marauder - DyShyKy
00 Explorer 5L - Bernyce

Re: JNC & AD2W Operand Clarity

Unread postby jsa » Thu Jul 12, 2018 8:49 pm

The addition has not caused a carry, so jump.

The listing is not given correct output.

Which version of SAD did you use?

Is there a jump to L5b7e from somewhere else?
Cheers
John
jsa
Power Poster
 
Posts: 387
Joined: Thu Jan 16, 2014 1:44 am
Location: In the shed or On the Computer, 'straya
Name: John
Vehicle Information: Escort RS Cosworth
EEC-IV GHAJ0 ANTI or COSY

Re: JNC & AD2W Operand Clarity

Unread postby decipha » Thu Jul 12, 2018 9:56 pm

nope there is no other jumps

the sad i have on the homepage from 2013 its the only one i know of that works

yea that makes sense
User avatar
decipha
Tooner
 
Posts: 15323
Joined: Mon Jul 15, 2013 5:29 pm
Location: New Orleans, LA
Name: Michael Ponthieux
Vehicle Information: Supercoupin' x10
90 (4x 5spds) - Dante, Ruby, Daja, Ava
91 4r70w - Skarlett
92 (2x) 5spd & auto - Bianqa, Andrea
93 auto - Danika
94 5spd Rionda
95 auto Aisha
Vehicle 2 Information: Others:
00 Lincoln LS - Luanda
98 Camaro SS - Bounquisha
02 Harley F-150 - Sasasha
03 Marauder - DyShyKy
00 Explorer 5L - Bernyce

Re: JNC & AD2W Operand Clarity

Unread postby jsa » Fri Jul 13, 2018 5:36 am

3.07 is the latest, many bugs fixed.

https://github.com/tvrfan/EEC-IV-disassembler
Cheers
John
jsa
Power Poster
 
Posts: 387
Joined: Thu Jan 16, 2014 1:44 am
Location: In the shed or On the Computer, 'straya
Name: John
Vehicle Information: Escort RS Cosworth
EEC-IV GHAJ0 ANTI or COSY

Re: JNC & AD2W Operand Clarity

Unread postby jsa » Sat Jul 28, 2018 2:41 pm

Decipha,

Did you try 3.07, does 3.07 output your jnc example more accurately?
Cheers
John
jsa
Power Poster
 
Posts: 387
Joined: Thu Jan 16, 2014 1:44 am
Location: In the shed or On the Computer, 'straya
Name: John
Vehicle Information: Escort RS Cosworth
EEC-IV GHAJ0 ANTI or COSY

Re: JNC & AD2W Operand Clarity

Unread postby decipha » Sun Jul 29, 2018 10:43 pm

i have not had any time as of lately, when i do i'll post back
User avatar
decipha
Tooner
 
Posts: 15323
Joined: Mon Jul 15, 2013 5:29 pm
Location: New Orleans, LA
Name: Michael Ponthieux
Vehicle Information: Supercoupin' x10
90 (4x 5spds) - Dante, Ruby, Daja, Ava
91 4r70w - Skarlett
92 (2x) 5spd & auto - Bianqa, Andrea
93 auto - Danika
94 5spd Rionda
95 auto Aisha
Vehicle 2 Information: Others:
00 Lincoln LS - Luanda
98 Camaro SS - Bounquisha
02 Harley F-150 - Sasasha
03 Marauder - DyShyKy
00 Explorer 5L - Bernyce

Re: JNC & AD2W Operand Clarity

Unread postby jsa » Mon Jul 30, 2018 12:26 am

No worries, I ended up having a look at your example with 3.07 myself and find it to be more accurate.

TVRfan is looking at working at 3.08 so It's time to load him up with all the latest bug finds.
Cheers
John
jsa
Power Poster
 
Posts: 387
Joined: Thu Jan 16, 2014 1:44 am
Location: In the shed or On the Computer, 'straya
Name: John
Vehicle Information: Escort RS Cosworth
EEC-IV GHAJ0 ANTI or COSY


Return to Programming & Coding

Who is online

Users browsing this forum: No registered users and 1 guest