Tandy 1000 Programmer's Reference Manual page 92

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 1
I
System Calls
Example:
The following program sets the system clock to 0 and
continuously displays the time. When a character is typed,
the display freezes; when another character is typed, the
clock
is reset
to 0
and
the display starts again.
time
db
" 0 0 : 0 0 :
00
I
0 0 " ,
13,10
, " $ "
ten
db
1 0
f
unc-2DH
:
5et-time 0 , 0 , 0 , 0
read-clock:
get-time
convert ch,ten,time
convert cl,ten,time[31
convert dh,ten,time[61
convert dl,ten,time[91
display time
TH15 FUNCTION
5ee
Function 2CH
5 e e
end
o f
chapter
5 e e
end
o f
chapter
5ee
end
o f
chapter
5 e e
end
o f
chapter
5ee
Function 09H
dir-console-io EFFH
; s e e
Function 06H
CmP
al,00H
; w a 5
a
char. typed?
1ne
5 t O P
;yes, 5top the timer
Imp
read-clock
;no keep timer on
stop:
read-k bd
; 5 e e
Function 08H
Imp
f
unc-2DH
;keep displaying time
90

Advertisement

Table of Contents
loading

Table of Contents