Thread View: comp.sys.amiga.tech
2 messages
2 total messages
Started by Matt Crowd
Wed, 19 Dec 1990 10:17
Interupts? Help
Author: Matt Crowd
Date: Wed, 19 Dec 1990 10:17
Date: Wed, 19 Dec 1990 10:17
25 lines
1483 bytes
1483 bytes
I have yet another minor problem with my program... I have 2 screens swapping between each other for the title sequence of a program. I want these screens to swap about every 5 seconds. I am using Delay() to do the timing for the screen swapping. However, I want the user to be able to click on the mouse button to end this intro sequence and load the main program. The problem is Delay() will not return for, at worse, just under 5 seconds, which is too long. I would like to be able to detect the mouse press straight away, and still have the program swap screens correctly no matter how fast the machine it is running on is. I am an old Z80 assembler programmer and my mind is screaming interupts as the solution to this problem, but I have no idea how to set one up on the Amiga to do this. Examples/references/other solutions would be appreciated. Wait! I have another idea! How about using WaitTOF! After each of these I could check the mouse event and increment the timer... Sound ok? Thanks, -- Matt Crowd Amiga Man Email Address glmwc@marlin.jcu.edu.au
Re: Interupts? Help
Author: Peter Cherna
Date: Wed, 19 Dec 1990 16:39
Date: Wed, 19 Dec 1990 16:39
24 lines
1632 bytes
1632 bytes
In article <1990Dec19.101704.4071@marlin.jcu.edu.au> glmwc@marlin.jcu.edu.au (Matt Crowd) writes:
>
>Wait! I have another idea! How about using WaitTOF! After
>each of these I could check the mouse event and increment the timer...
>Sound ok?
You could use timer.device to give you a poke after 5 seconds. Then
you could Wait() on signals from both timer and intuition.
Using WaitTOF() would be like a semi-busy loop. While you're relinquishing
cycles you don't need, you're still waking up very often though nothing
may have happened. You can use INTUITICKS messages instead of WaitTOF().
INTUITICKS wake you up about 10 times a second, compared to 50 or 60
for WaitTOF(). But the timer.device would be the most multitasking-friendly.
In your case, INTUITICKS will likely cause no difficulties.
>Matt Crowd Amiga Man
Peter
--
Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"Oh, PIN-compatible! I thought you wanted me to make it IN-compatible!"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads