poke function ....

ralph muha ralph@ycrdi.com
Tue Sep 22 08:21:00 GMT 1998


>What will happen in stack whenever the function pokeb
>is being called?? Is the same like Intel where the frame pointer

when you call the function the return PC is pushed onto the stack.
if the function needs a stack frame, it must create one:

pokeb:
	link	%a6,#<sizeof-frame>
	move.l  8(%a6),%a0
	add.l   12(%a6),%a0
	move.b  19(%a6),(%a0)
	unlk	%a6
	rts

the argument offsets change by 4 to account for the saved frame pointer

of course, in this simple example, the function doesn't need
a stack frame...  gcc has an option (omit-frame-pointer) to
tell the compiler not to use frame pointers at all...

r





More information about the crossgcc mailing list