Mail Archives: djgpp/1999/06/04/19:35:22
El día Fri, 04 Jun 1999 13:45:58 +0200, Anders David Skarin
<hobbit AT swipnet DOT se> escribió:
>word MOUSE_getX(void)
>{
> __asm__("cli");
> return (mouse.x);
> __asm__("sti");
>}
Do you know what 'return' means? That __asm__("sti") has no chance of
ever being reached, so I guess you are turning off interrupts at the
very beginning of your program and then never turning them on again,
so your mouse handler won't be called and mouse.x will remain 0.
Anyway, you don't need to disable interrupts just to read that struct
member.
>but it wont return nothing but zero.. ...is this because the mouse
>struct is locked, and can only be accessed by the handler?
No.
>Question2: Does locked memory go inte conventional memory?
No.
Regards,
GUILLE
----
Guillermo Rodriguez Garcia
XXguille AT XXiies DOT XXes (ya sabes :-)
- Raw text -