[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clock, BASIC, and IIgs
- Subject: Re: Clock, BASIC, and IIgs
- From: nparker@cie-2.uoregon.edu (Neil Parker)
- Date: 1996/06/15
- Newsgroups: comp.sys.apple2
- Organization: University of Oregon Campus Information Exchange
- References: <4psjpr$p3b@news.ysu.edu>
In article <4psjpr$p3b@news.ysu.edu> be404@yfn.ysu.edu (Adalbert Goertz)
writes:
>How about a BASIC program to give a beep every 1 sec?
Yeesh. That would get *really* annoying *really* fast.
>or a number of beeps at 2:00 pm?
Definitely doable.
However, neither of these are projects that you would want to write in
BASIC. In BASIC, the best you could do would be to dedicate your computer
to the task--i.e. as long as your metronome or alarm clock were running,
you wouldn't be able to run anything else.
Both, however, are ideal candidates for a machine-language program
connected to one of the IIGS's interrupt sources, such as the heartbeat
interrupt. This allows your routine to grind away in the background while
you run other programs.
One of the first GS-specific machine-language programs I ever wrote was an
external command for BASIC.SYSTEM that puts a clock in one corner of the
text screen, using this very method. (The only problem is that it does
nasty things if you quit from BASIC without first turning off the clock.)
- Neil Parker
--
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker
"I was going to be a neo-deconstructivist but Mom wouldn't let me."
-- Calvin and Hobbes, 7/13/1995