I am having a problem interpreting this fragment from a PTP2 disassembly using SAD. it looks like the routine is placing a parameter (304d) on the regular stack and then returning to an address on the ALT stack. But I don't see where the address was placed on the ALT stack or any significance to the ALT stack location (a634). Is this just a bad decompile or my ignorance?
8 3042: a1,68,03,20 ldw R20,368 STACK = 368;
8 3046: ef,f1,f0 call 213a Sub250();
8 3049: a1,34,a6,22 ldw R22,a634 ALTSTACK = a634;
8 304d: f4 bnk0
8 304e: b1,11,11 ldb R11,11 BANK_SEL = 11;
8 3051: b1,ff,77 ldb R77,ff R77 = ff;
8 3054: c9,4d,30 push 304d push(304d);
8 3057: fe,f1 retia return;
Moderators: EDS50, cgrey8, 2Shaker, Jon 94GT
Re: question about ALTSTACK
When the Alt Stack is used, it is often (as here) used for the background dispatch tables/lists.
In the PTP2 bin, these start at 1A4D6 and continue through 1A70C. !A634 is in between these, and so when the Alt Ret instruction executes, it will go to the address at 1A634 which is 831DE
In the PTP2 bin, these start at 1A4D6 and continue through 1A70C. !A634 is in between these, and so when the Alt Ret instruction executes, it will go to the address at 1A634 which is 831DE
-
decipha
Re: question about ALTSTACK
slight correction, not that it matters though
the background list ends at 1xa6f4
1xa70a is the xtalhps rate for a 24mhz clock with 1xa70c being the 24mhz clock index table
that 31de routine is where the setup for the 1st mafv read loop happens
the background list ends at 1xa6f4
1xa70a is the xtalhps rate for a 24mhz clock with 1xa70c being the 24mhz clock index table
that 31de routine is where the setup for the 1st mafv read loop happens
Who is online
Users browsing this forum: No registered users and 46 guests