;*************************** AMUS Program Label ******************************
; Filename: WAKE.M68 Date: 05/17/89
; Category: UTIL Hash Code: 767-665-564-123 Version:
; Initials: IRW/AM Name: IRWIN M. GOLDSTEIN
; Company: LONDON HOUSE INC. Telephone #:
; Related Files:
; Min. Op. Sys.: Expertise Level: BEG
; Special:
; Description: Utility to wake up another job from a sleep state. Good way to
; get an instantly updated copy of VCRSTS.LST from a job running CRT610/F.
; Usage: .WAKE jobnam (where jobnam is the name of the job to be woken up)
;*****************************************************************************
SEARCH SYS ; system macros
SEARCH SYSSYM ; system symbols
SEARCH TRM ; terminal symbols
SUB #6,SP ; make room for jobname on stack
FILNAM @SP,XXX ; pack jobname RAD50 and place on stack
MOV @SP,D3 ; get jobname (1st 2 words of filename)
ADD #6,SP ; clean up stack
MOV JOBTBL,A0 ; get begining address of job table
LOOK: MOV (A0)+,D7 ; get address of JCB
BEQ LOOK ; no job here, keep looking
CMP D7,#-1 ; end of job table?
BEQ NOJOB ; yes - job not found
MOV D7,A3 ; move JCB address to a data register
CMP D3,JOBNAM(A3) ; do jobnames match?
BEQ WAKEUP ; match - now wake up the job
BR LOOK ; no - keep looking
NOJOB: TYPECR <?Non-existent job> ; job not found
BR QUIT ; exit
; A3 indexes job we want to wake up:
WAKEUP: MOV A3,A0
WAKE
BNE WHAT
TYPECR <Job awakened>
BR QUIT