[A89] Re: aaaaaarrrrrrrgggghhh


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

[A89] Re: aaaaaarrrrrrrgggghhh




OK, I've traced the code; here is exactly what happens.

+no event hooks - works perfectly

+event hook installed before - installs; then a dialog box saying memory flashes
slowly. A brown crash if you will....

+teos installed before - black bar on top of screen... not like anything I've
seen before (not kidding)

+teos installed before (case #2) - does the exact same as when an event hook was
installed before... this happens when I take out the push/pop code for the
stack.

I have verified that the address being called is correct. So the problem must
lie in the event pointer... how or where I am at a loss to say... I've tried
setting the address pointed to by the event pointer, but then I get address
errors.

for reference, here is the code that i'm using:
EVENT *ev;
void *gpOldHandler=0;
...

asm("
 move.l %1,%%a0    /*get the pointer to the next event hook in a0*/
 tst.l (%%a0)      /*is it zero ?*/
 jbeq FinishUp    /*it was zero so goto FinishUp*/
 move.l %0,%%a2     /*Pass the pointer to the event in a2 for TEOS*/
 move.l %%a2,-(%%sp) /*Pass the pointer to the event on the stack for most other
event hooks*/
 jsr (%%a0)       /*Run the event hook*/
 addq.l #4,%%sp     /*Restore the stack*/
FinishUp:         /*The exit point when there is no event hook to call*/
"::"p"(ev),"g"(gpOldHandler):"a0","a2");

Thanks,
Greg


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Follow-Ups: References: