gnupic: What are stkadj and FUSTART???
Subject:
Re: What are stkadj and FUSTART???
From:
Lorenzo Marcantonio ####@####.####
Date:
13 Mar 2012 20:14:33 -0000
Message-Id: <20120313201420.GA24068@aika.discordia.loc>
On Tue, Mar 13, 2012 at 10:08:22AM -0600, Joe Pfeiffer wrote:
> Spent a while looking around, and found mention of them elsewhere...
> but couldn't find them in the gpasm source at all.
I asked because gpasm chokes on them... mpasm probably has them implemented for
some COFF stuff... indeed I found a thread around where someone had to rename
his function called stkadj!
Microchip during its "innovation" removed a way to set the include path in mpasmx (and the errors are in an .err file only, no stderr logging!)
Funny thing: mpasmx seems to be written in... pascal! (object free pascal, probably, the exec is not stripped so the inner symbols are visible:P)
A 'strings' check on mplabx revealed these between the various opcodes:
ICD_IRQ
ICD_POP
ICD_PUSH
ICD_RET
EMULDIS
EMULEN
FUEND
FUSTART
MOVFX
RELOCTLMERGE
SCNEND_LFSR
SCNSTART_LFSR
STKADJ
TRAP
TRET
Some of these are mentioned here:
http://support2.microchip.com/KBSearch/KB_Ticket.aspx?ID=Tt6UJ9A0003LM
so it seems there are undocumented features in mpasm
> This link includes a stkadj function, but I don't know if it's the
> same stkadj you're finding (it's being used in some table lookup code)
No, it's some kind of internal macro, the comment says 'pseudo-instruction'
I think its used for critical stack depth analysis (mplink has a -g flag to "generate the report file for stack analysis", but didn't found any doc)
> And here's a use of FUSTART -- I've got *no* idea what it's being used
> for (from context, I wouldn't be surprised if you came back and told
> me that this is the code you found it in!)
More or less... C18 libc, still; IMHO is a marker to emit a COFF function
something (there's also FUEND).
Morale: removed them, code works XD
--
Lorenzo Marcantonio
Logos Srl