;*; Updated on 24-Apr-90 at 10:58 AM by Matt Badger; edit time: 0:00:48
;*************************** AMUS Program Label ******************************
; Filename: DSKPPN.SBR Date: 05/30/89
; Category: XCALL Hash Code: 465-671-442-255 Version: 1.0(101)
; Initials: DD Name: DAVE DRAKE
; Company: DOUBLE-D SOFTWARE SERVICES Telephone #:(702)438-2173
; Related Files: NONE
; Min. Op. Sys.: N/A Expertise Level: INT
; Special:
; Description: Returns currently logged device and ppn
;
; I did not write this program. If anyone recognises it as their own, feel
; free to claim it.
;*****************************************************************************
;********************************************************************
; Basic Assebbly Subroutine: DSKPPN.SBR
;
; Returns currently logged device and Ppn
;
; USEAGE: XCALL DSKPPN,DISK,PPN
;
; Where DISK is string,5
; PPN is string,7
;
;********************************************************************
SEARCH SYS
SEARCH SYSSYM
ADD #4,A3 ; offset to addr of arg1
MOV @A3,A2 ; address of arg1 to a2
ADD #12,A3 ; offset to addr of arg2
MOV @A3,A4 ; address of arg2 to a3
MOV JOBCUR,A0 ; index job
MOV #64,A1 ; offset of JOBDEV
ADD A0,A1 ; offset to JOBDEV
UNPACK ; make ascii and save in return
MOVW 66(A0),D1 ; get drive number
OCVT 2,OT$MEM ; convert and save
MOV A4,A2 ; point to addr of arg2
MOVW JOBUSR(A0),D1 ; get PPN
RORW D1,#10 ; bring P into lo byte
AND #377,D1 ; mask it
OCVT 0,OT$MEM ; convert and save
MOVB #',,(A2)+ ; comma
MOVB JOBUSR(A0),D1 ; get ppn again
AND #377,D1 ; mask PN
OCVT 0,OT$MEM ; convert and save
RTN ; done