WAKNO.M68- Decodes response ID and awakes corresponding job
; Program Name: WAKENO.M68 - WAKE the nth job from sleeping
; Edit History:
;[100] March 29, 1995 03:32 PM Edited by Bob Rubendunst
; created from WAKE.M68
PHDR -1,0,PH$REE!PH$REU
JOBIDX A0 ; job index
CMPW @A3,#1 ; one arg?
BEQ 100$ ; yes
TYPECR <?wrong # of arguments in WAKNO.SBR>
EXIT
100$: MOV ADDR1(A3),A0
PUSH
MOV SP,A2
MOV A2,A6
MOV #2,D0
110$: MOVB (A0)+,(A6)+ ; copy the thre digit decimal # there
DBF D0,110$
GTDEC ; D1 gets this number
POP
MOVL JOBTBL,A0
120$: MOVL (A0)+,D7 ; get jcb address
BEQ 130$ ; no job yet-try next
CMPL D7,#-1 ; end of jobs
BEQ 140$ ; yes-no match
130$: DBF D1,120$
MOV D7,A0
WAKE
RTN
140$: TYPECR <Job not defined.>
RTN