[A89] Re: Handles


[Prev][Next][Index][Thread]

[A89] Re: Handles




<What kind of memory block is this?>

It's a block that contains detokenized program
statements. 

I get this handle by doing this:

// code

programBodyPointer = HToESI(sym_entry -> handle); 		
while (GetArgType(programBodyPointer) != END_TAG)
 programBodyPointer--;
					
programBodyPointer = programBodyPointer - 1;							
handle = display_statements(programBodyPointer, 0, 0);

// code

I want to write the contents of this block to a file.
What I posted works for doing so, but it's darn slow. 

While I'm flooding the mailing list, I do have one
other question.

HToESI returns a pointer to the FUNC_TAG. Below the
FUNC_TAG there are three byte flags. Below them, a
program parameter list follows, terminated with
END_TAG. The pointer to an actual program is just
below this END_TAG. 

As you can see from my code, I locate the END_TAG and
move my pointer to the block of tokenized statements.
However, this block of tokenized statements is of
variable length. So with a large program, moving back
1 byte isn't always enough. The TI SDK contains a
function called GetFuncPrgmBodyPtr that automatically
skips all the parameters and flags.  However, I cannot
find an equivalent in the TIGCC documentation.  Can
anyone help, with either the TIGCC equivalent or a way
to do this?

Thank you so much. Rick

 

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



References: