Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 188

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Model II
TRSDOS
TIMER
(function code 25)
This routine lets you start a timer to interrupt a program when time runs out.
D nlike the
DELAY
routine,
TIMER
runs concurrently with your program. One
application would be to give an operator a specified number of seconds for
keyboard input, and to interrupt the keyboard input routine if no input was
made within the time limit.
When setting the timer, you tell it how many seconds to count down.
TRSDOS
will then continue executing your program, until the timer counts down to
zero or you reset the timer.
This is a "one-shot" timer. When it counts to zero and causes an interrupt, it
automatically shuts off.
See Programming with
TRSDOS
for information on interrupts.
Entry Conditions
(HL)
=
Routine to handle interrupt when timer counts to zero
BC
=
Number of seconds to count down
A=
25
If
HL and
BC
both equal zero, then timer is turned off.
If
HL
=
0 and
BC
is not equal to zero, then time count is reset to the value in
BC,
and timing continues.
HLDKEY
Process the (HOLD) Key (function code 29)
This routine enables the
(HOLD)
key pause-function.
Entry Conditions
A=29
B
=
Function Code
224

Advertisement

loading