Search found 260 matches

by jsa
2024 Mar 28, 06:36
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 20:13 I did. I did all of the SCA commands and then went through and found the Subroutines. Should I have gone through and deleted the SCA commands that happened to land on a defined Subroutine?
Yes, Sub command triggers a scan. Both in place will give the duplicate command error.


This includes an updated DIR and the old DIR with changed sort order.
Please use this new one. You can add more to it, such as payloads, scalars, functions, tables and subs.
OMAE2.zip
(24.76 KiB) Not downloaded yet
See comments in the file, ask questions if need be.

While table and function commands can have a name, eliminating the need for SYM, my time with V5.08 and Math has convinced me that the FUN & TAB line gets way to long when the name is not on a separate SYM line.
I noticed you liked adding X10 options to convert from hex to decimal. I find it better to use V where possible to convert to engineering units.
Note V1 gives the same answer as X10, something to ponder for better math in V5.08 on.

You will see some Fn & Tb comments as investigate size. I have investigated, check them out, see if it makes sense why I've chosen the size.
Look back at your previous troublesome example, see how it looks now.

I think the stuff I've changed is correct, happy to be proven otherwise.
by jsa
2024 Mar 27, 23:43
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 22:29 That 8f8d6 8f8de should be defined with the word command, and just because the words in between aren't directly referenced in the code, they are present so they can be indirectly referenced.
I do have one question about this though, should the word command be used in a range or should I do the addresses individually?
Indeed, indirect and indexed address modes can reference a series of addresses in a loop.
A range will get the job done quickly, so go with that.

What can be said about SAD?
Very user driven. If you do not know exactly how to use it, it will get you completely lost.. LOL
The mantra is user is king, so it will not save you from garbage in garbage out.
It does not capture the extent of loops, so the user has to be awake to that.

Do you use the branch (jump) comments I provided with RZASA?
I do, but wasn't paying attention to rzasa code when I was looking for the words referenced above.
Yeah, not so much as a comparison source for OMAE, just asking if it were useful for RZASA alone.

Would automatic SAD produced branch comments help spot the loops in subsequent code in OMAE2?
Absolutely, that makes it a ton easier to follow the code. I was not going far enough to see the loop, I may have seen it if i was following in RZASA due to the cmt file you provided me. I guess I need to try and make one for OMAE2.
I agree it is so much easier with the jump comments in place.
Generating it line by line is a long and tedious process. I wised up eventually and have a less tedious process, but really messy to do. The DIR and LST are not quite ready for that yet.

Also, I guess I need to pop over to the other thread and ask if TVRFAN could incorporate the looped scan command and possibly SAD produced branch comments, and loop comments. Also, SAD 5 still doesn't like an address to have both a word value and byte value assigned to it, but it does work in SAD 4.012....mostly.
One voice requesting this stuff does not carry as much weight as two...or more.
Yes, ask for the scan command to be updated to support range.
Yes, ask for the branch (jump) comments to be generated by SAD.

V4 ignores the duplicate byte and word.
V5 requires a size option for the sym command. I have not tested these yet, I hope they work when I get a chance, as I'd hate to bury TVRfan under more bugs right now.
by jsa
2024 Mar 27, 22:01
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 21:33 There was a mention of word alignment in the indirect address mode section, I just do not remember, and can not find where it says how it is accomplished, I guess the fill is skipping a spot to properly align the address?
No mention is made of how IIRC, just that it should be even.
So yes FF fills the odd address and the word is on an even address.
by jsa
2024 Mar 27, 21:57
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

Adding in the caller to your post. Another word confirmed at 8F8DA
BOOSTEDEVERYTHING wrote: 2024 Mar 27, 21:18

Code: Select all

 
    Sub_8f976:
8f976: f2                 pushp                  push(PSW);
8f977: a3,ec,34,38        ldw   R38,[Rec+34]     R38 = [117b4];
8f97b: ad,04,36           ldzbw R36,4            wR36 = 4;
8f97e: 2f,d9              scall 8f959            Sub_8f959 ();
8f980: f3                 popp                   PSW = pop();
8f981: f0                 ret                    return;
 
   Sub_8f959:
8f959: 10,08              rombk 8
8f95b: 6f,37,d6,f8,38     ml2w  R38,[R36+f8d6]   lR38 *= [R36+8f8d6];        #<<<<<<<<<< lr38 *= [8F8DA]
8f960: 0d,01,38           shldw R38,1            lR38 <<= 1;
8f963: d3,03              jnc   8f968            if (B15_R3a = 1)  {
8f965: bd,ff,3a           ldsbw R3a,ff           swR3a = ff; }
8f968: c3,37,0a,11,3a     stw   R3a,[R36+110a]   [R36+1110a] = R3a;
8f96d: 09,01,36           shlw  R36,1            R36 <<= 1;
8f970: c3,37,42,0f,3a     stw   R3a,[R36+f42]    [R36+10f42] = R3a;
8f975: f0                 ret                    return;
Added subsequent code to your post.
You have not looked far enough to spot the loop that references another four words up to 8F8DE

Code: Select all

02504: 01,4e              clrw  R4e              R4e = 0;
02506: 10,08              rombk 8
02508: a3,4f,d6,f8,50     ldw   R50,[R4e+f8d6]   R50 = [R4e+8f8d6];     <<<<<<<<<< 8F8D6..8F8DE
0250d: 05,50              decw  R50              R50--;
0250f: db,02              jc    02513            if (R50 < 0)  {
02511: 01,50              clrw  R50              R50 = 0; }
02513: c2,4d,50           stw   R50,[R4c++]      [R4c++] = R50;
...
0251e: 75,02,4e           ad2b  R4e,2            R4e += 2;
02521: 99,10,4e           cmpb  R4e,10           
02524: d3,e0              jnc   02506            if (R4e < 10) goto 02506;         <<<<<<<<<


Added subsequent code to your post.
You have not looked far enough to spot the loop that references all words up to 8F8E4.

Code: Select all

   Sub_8f8e6:
8f8e6: a1,40,0f,36        ldw   R36,f40          R36 = f40;
8f8ea: a1,d6,f8,34        ldw   R34,f8d6         R34 = f8d6;
...
8f90a: 89,e6,f8,34        cmpw  R34,f8e6         
8f90e: d3,de              jnc   8f8ee            if (R34 < f8e6) goto 8f8ee;       <<<<<<<< 8F8E4 is the last word reference that will be looped.
here is where I see 8f8d6 referenced as a word value
What have we proven?

What can be said about SAD?

Do you use the branch (jump) comments I provided with RZASA?
Would automatic SAD produced branch comments help spot the loops in subsequent code in OMAE2?
by jsa
2024 Mar 27, 21:21
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 20:44 the 8f951 to 8f956 looks to be fill to me. or an address pointing to zero
Have you read about the address modes, was there mention of word alignment?

In the context of word alignment what has the FF fill done?

SAD has picked up 8f952 and 8f954 as words.
Have you searched for code referencing 8F952?
Could 8F956 be part of the same word/structure?
by jsa
2024 Mar 27, 21:07
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 21:00 But there are calls to Sub_8f8e6
Cross post again, so continuing from my previous.

Good, makes it clear cut as code.
But I do not understand the repetitive words, the 115a and 8ad if the above are words, So some of it must be code, Correct?
Prove it one way or the other, post up the code referencing 8f8d6, we can sift through it.
by jsa
2024 Mar 27, 21:02
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Mar 27, 20:48 The other thing that confuses me is that there doesnt seem to be anything to start the next subroutine....

Code: Select all


8f8d6: ad,08              word    8ad
8f8d8: ad,08              word    8ad
8f8da: 5a,11              word   115a
8f8dc: b8,22              word   22b8
8f8de: 5a,11              word   115a
       5a,11,
       00,00        sb3b  R0,R0,[R10++]    R0 = [HSO_IntPend1];
Sorry, This is after adding a word command to the dir file for 8f8d6 8f8de
Not sure what you are referring to as the next subroutine.
No worries adding the word command to visualise what is going on.
To me, the part that is still commanded with a scan as code stands out like a sore thumb as part of the word/structure.

Looking at that part without any commands, a pattern is evident.
Find the code referencing the word 8f8d6 and paste it up here.

Code: Select all

8f8d6: ad,08              word    8ad

8f8d8: ad,08,5a,11        ???   

8f8dc: b8,22              word   22b8

8f8de: 5a,11,5a,11,00,00,5a,11  ???  
>>>>>>>> Seems like ther should be a push command or other Subroutine "starter" command, seems to start mid-routine
There can be code stubs, but treating them with great suspicion is the correct approach. More likely to be something else.
by jsa
2024 Mar 27, 20:26
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

Code: Select all

##SCA 8f951   DID NOT PRODUCE ANY RESULT
##SCA 8f956   DID NOT PRODUCE ANY RESULT

Code: Select all

8f951: ff                 ???   

8f952: 00,00              word      0
8f954: 00,00              word      0

8f956: 00,00,00           ???   
What do you think of this?
by jsa
2024 Mar 27, 20:20
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

Paste the code that references the word at 8f8d6.

Paste the code that show sjmp to 8FB39 is a valid destination.

Cross post with yours, but still valid.
Suss, sorry aussie slang.
by jsa
2024 Mar 27, 20:10
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 337
Views: 53338

Re: EEC V file conversion

You have noted in DIR that this is suss, but left the command SCA 8f8d8 in place.

Code: Select all

8f8d6: ad,08              word    8ad

8f8d8: ad,08,5a           ldzbw R5a,8            wR5a = 8;
8f8db: 11,b8              clrb  Rb8              Rb8 = 0;
8f8dd: 22,5a              sjmp  8fb39            goto 8fb39;

8f8df: 11                 ???   
Why do you think it more likely to be code than more words?

Have you searched for 8f8d6 and f8d6 to find the code referencing the word and determine if it might reference subsequent words?