Hello all

How can i copy a function pointer to TOSL:TOSH:TOSU? In assembler its
pretty simple using HIGH,LOW etc. I tried it using inline assembler, but
since the function pointer is a local variable, which i cannot use, I'm
helpless.
What I want to do is the following in C:
movff MY_PTR,STKPTR
molw LOW(LOCAL_VARIABLE)
mowf TOSL
molw HIGH(LOCAL_VARIABLE)
mowf TOSH

Btw. I declared my function pointer
__code void (*ptr)(void);
Is this the correct way? It should be a pointer to a function in code.

Thanks allot in advance

Note: I know about the risks playing around with the hw stack but i need it.

Jan

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to