Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_3_19910112
-
utilities/heure.fai
There are no other files named heure.fai in the archive.
title heure
search monsym
;This program asks the user for a period in seconds.
;It then runs in background and displays the time
;in the lower right corner of the terminal
;at each period.
a1= 1
a2= 2
a3= 3
dix= =10
mil= =1000
period: block 1
delay: block 1
mode: block 1
line: block 1
column: block 1
start: reset
when: hrroi a1,[asciz/
How often do you want the time to be displayed?(seconds): /]
psout ;ask for a period
movei a3,dix
movei a1,.priin ;get it back
nin
erjmp error ;error if bad input.
jumpe a2,error ;don't accept a period=0.
movem a2,period ;store period in sec. in period.
imuli a2,mil
movem a2,delay ;store period in millisec. in delay.
hrroi a1,[asciz/OK, I will display it every /]
psout ;output confirmation message,
movei a1,.priou
move a2,period
movei a3,dix
nout ;confirming the time.
erjmp error
hrroi a1,[asciz/ seconds.
/]
psout
hrroi a1,[asciz/c,b
/]
rscan ;place the command "cONTINUE,bACKGROUND"
haltf ;in the job's rescan buffer before halting
movei a1,.rsini ;so that the EXEC will immediately
rscan ;continue us in background.
haltf
haltf ;stop our normal foreground life.
sleep: move a1,delay ;when continued, go to sleep
disms ;for the specified period.
movei a1,.priou
rfmod
movem a2,mode
and a2,[-1,,777477]
sfmod
hrroi a1,[asciz/a/]
psout
movei a1,.priin
bin
movem a2,line
movei a1,.priin
bin
movem a2,column
hrroi a1,[asciz/Y7h/]
psout
movei a1,.priou
move a2,[-1]
move a3,[ot%nda+ot%scl]
odtim
hrroi a1,[asciz/Y/]
psout
movei a1,.priou
move a2,line
bout
movei a1,.priou
move a2,column
bout
; movei a1,.priin
; cfibf ;clear terminal input buffer.
; movei a1,.priou
; cfobf ;clear terminal output buffer.
move a2,mode
movei a1,.priou
sfmod
jrst sleep ;and start again (forever)...
haltf
error: hrroi a1,[asciz/ ? invalid number/]
psout ;error routine: output error message
jrst when ;and go to prompt for period again.
end start