Hmm that didn't work
Code:
StackPointer = (&Myfunc & 0x0000FFFF);
StackPointer - 1 = (&MyFunc & 0xFFFF0000) >> 16;
I'm probably not using it correctly, I forgot to say.. the adress is only 16 bits long, so I tried the following:
Code:
stackPointer = ((currProc->pc) & 0x00FF)
(stackPointer - 1) = ((currProc->pc) & 0xFF00) >> 8;
pc is a function pointer so I'm thinking the way I'm using it is correct. no?
typedef struct pcb_struct
{
..
void (*pc)(void); // function pointer
..
} ProcCtrlBlock;
I get this error though:
os.c:247: invalid operands to binary &
os.c:248: invalid operands to binary &
Ted