Trailing-Edge
-
PDP-10 Archives
-
tops20_version7_0_monitor_sources_clock
-
monitor-sources/lpfedv.mac
There are 49 other files named lpfedv.mac in the archive. Click here to see a list.
; UPD ID= 8548, RIP:<7.MONITOR>LPFEDV.MAC.2, 9-Feb-88 17:05:05 by GSCOTT
;TCO 7.1218 - Update copyright date.
; UPD ID= 2103, SNARK:<6.1.MONITOR>LPFEDV.MAC.5, 3-Jun-85 15:45:29 by MCCOLLUM
;TCO 6.1.1406 - Update copyright notice.
; UPD ID= 4523, SNARK:<6.MONITOR>LPFEDV.MAC.4, 13-Jul-84 20:05:20 by PURRETTA
;Update copyright notice
; UPD ID= 597, SNARK:<6.MONITOR>LPFEDV.MAC.3, 5-Apr-82 15:59:15 by MURPHY
;TCO 6.1074 - Revise build procedures
; UPD ID= 1563, SNARK:<5.MONITOR>LPFEDV.MAC.2, 15-Feb-81 16:56:30 by ZIMA
;Move 5.1256 to not step on any allocation changes made by the -11.
;<4.MONITOR>LPFEDV.MAC.3, 12-Apr-79 21:02:17, Edit by MCLEAN
;IF DTEQ FAILS SET HARD ERROR
;<4.MONITOR>LPFEDV.MAC.2, 4-Mar-79 18:15:21, EDIT BY KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
; COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1976, 1988.
; ALL RIGHTS RESERVED.
;
; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
; INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
; COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
; OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
; TRANSFERRED.
;
; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
; AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
; CORPORATION.
;
; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
; SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
; FRONT-END DEVICE DEPENDENT CODE FOR THE LINE PRINTER
; (LP20 - DTE20 SERVICE) SPECIFIC CODE.
IFN KLFLG,< ;WHOLE FILE...
; LINE PRINTER DEVICE DISPATCH TABLE
FELPVT: IFIW!FESFLO ;SEND FLUSH
IFIW!FESLOP ;PAGE COUNTER
IFIW!FESACK ;ACK
IFIW!FESDTA ;SEND DATA
IFIW!FESEOF ;EOF
IFIW!FESNDS ;STRING DATA
IFIW!FETGLP ;SEND STATUS
IFIW!R ;RESTART
IFIW!R ;INITALIZE
IFIW!R ;INTERRUPT CHECK
IFIW!R ;OPEN
IFN <.-FELPMX>-FELPVT,<PRINTX %%INVALID DEVICE DEPENDENT TABLE SIZE>
; Line printer dispatch table
;FIRST THE PROTOCOL VECTOR
RESCD
LPTDTV::0 ; NO STRING DATA
LPTDON ; ACK
LPTTLS ; STATUS
LPTSLA ; SET LINE ALLOCATION
LPTSER ; SYSERR ENTRY
LPTRLD ; -11 RELOAD
SWAPCD
; ROUTINE TO SEND A FLUSH TO THE -11
FESFLO: HRRZ A,MSTRDT ;GET MASTER DTE NUMBER
MOVE B,[.DFFDO,,.FELPT] ;FUNCTION IS FLUSH OUTPUT, DEVICE IS LPT
SETZM C ;LOCAL DATUM IS LINE NUMBER
MOVEI D,(U) ;GET UNIT NUMBER
CALL DTEQ ;ASK -11 TO FLUSH LPT OUTPUT
JRST [ SETONE LPTHE,(U) ;ERROR IF THIS FAILS
RET]
RET ;RETURN
RESCD
FESLOP: HRRZ A,MSTRDT ;GET MASTER DTE NUMBER
MOVE B,[.DFSDO,,.FELPT] ;FUNCTION IS SPECIAL OPERATION, DEVICE IS LPT
MOVSI C,(U) ;GET UNIT NUMBER
HRRI C,4 ;FOUR BYTES OF INFORMATION
MOVSI D,(POINT 8,) ;GET SIZE AND POSITION PART OF POINTER
HRRI D,PGDATA(U) ;GET ADDRESS FIELD OF POINTER TO DATA PACKET
CALLRET DTEQ ;SEND PAGE COUNTER STUFF TO -11, AND RETURN
; ROUTINE TO SEND AN ACK TO THE FRONT-END
FESACK: HRRZ A,MSTRDT ;GET DTE NUMBER OF MASTER DTE
MOVE B,[.DFLBE,,.FELPT] ;ACK FUNCTION, TO LINE PRINTER
SETZM C ;CLEAR COUNT
MOVEI D,(U) ;UNIT NUMBER
CALL DTEQ ;GO SEND ACK TO FRONT-END
JRST [ SETONE LPTHE,(U) ;ERROR IF THIS FAILS
RET]
RET ;RETURN
FESDTA: HRRZ A,MSTRDT ;GET MASTER DTE NUMBER
HRLI A,LODDON ;GET POSTING ADDRESS
HRRI B,.FELPT ;GET DEVICE CODE (LPT)
MOVSI C,(U) ;GET UNIT NUMBER
HRR C,D ;GET COUNT FROM SIN
HRLI D,(POINT 8,) ;GET SIZE, POSITION PART OF POINTER
HRR D,LPTRLP(U) ;GET ADDRESS PART OF POINTER
OPSTR <SKIPN>,ALTP,(U) ;USING ALTERNATE BUFFER FOR LPT DATA ?
ADDI D,NLPBF ;NO, SO VFU OR RAM DATA IS IN ALTERNATE BUFFER
CALLRET DTEQ ;SEND DATA TO -11 FOR LPT
FESEOF: HRRZ A,MSTRDT ;GET MASTER DTE NUMBER
MOVE B,[.DFSTS,,.FELPT] ;SET DEVICE STATUS
MOVSI C,0(U) ;UNIT
HRRI C,2 ;COUNT OF BYTES
MOVE D,[POINT 8,[BYTE (16) .DVFEF]]
CALL DTEQ ;DO IT
JRST [ SETONE LPTHE,(U) ;ERROR IF THIS FAILS
RET]
RET ;RETURN
FESNDS: MOVSI A,LPTINT ;POSTING ADDRESS
MOVE B,[.DFHSD,,.FELPT] ;STRING DATA TO THE LPT
MOVSI C,0(U) ;UNIT
HRR C,F ;GET COUNT
TXO C,DTBYTM ;GUARANTEE BYTE MODE TRANSFERS
MOVE D,LPTCCW(U) ;BUFFER ADDRESS
CALLRET DTEQ ;GO DO RETUEST
;ROUTINE TO ASK FOR THE LPT STATUS
FETGLP: MOVE A,MSTRDT ;THE MASTER
MOVE B,[.DFRDS,,.FELPT] ;SEND STATUS
MOVSI C,0(U) ;UNIT NUMBER. DIRECT
MOVEI D,0(U) ;THE UNIT
CALL DTEQ ;REQUEST STATUS
JRST [ SETONE LPTHE,(U) ;ERROR IF IT FAILS THIS WILL UNHANG ANY WAITS
RET]
RET ;DONE
; ROUTINE TO INDICATE THAT A HARD ERROR OCCURRED WHEN AN -11 IS RELOADED
; CALLED FROM DTE SERVICE
LPTRLD: CAME A,MSTRDT ;IS THIS THE MASTER -11?
RET ;NO.
SAVET ;PRESERVE TEMPORARY ACS
MOVSI A,-LPTN ;GET # OF PRINTERS TO DO
LPTRL2: SETONE LPRLD,(A) ;MARK THAT THIS FRONT END WAS RELOADED
MOVEI B,(A) ;GET UNIT NUMBER
CALL SETER2 ;TURN ON HARD ERROR FOR THIS PRINTER
AOBJN A,LPTRL2 ;LOOP OVER ALL PRINTERS
RET ;RETURN TO DTE SERVICE
;ROUTINE CALLED BY THE PROTOCOL SERVICE TO DETERMINE THE OWNING
;PROCESS FOR A LPT. CALL IS:
; B/ UNIT,,DEVICE-CODE
;RETURN IS:
; +1/ WON'T HAPPEN FOR THIS DEVICE
; +2/ WITH A=OWNING PROCESS ID (OR -1 IF UNASSIGNED)
LPTSER: HLRZS B ;GET UNIT
JE LPOPN,(B),[ ;OPNENED?
MOVEI A,-1 ;NO. SAY IS UNASSIGNED
RETSKP] ;AND DONE
LOAD A,LPFRK,(B) ;YES. GET ID OF OWNER
RETSKP ;AND DONE
RESCD
;ROUINE TO SET LPT ALLOCATION
; B/ALLOCATION
; C/UNIT
LPTSLA::EXCH B,C ;SET UP ARGS
JSP CX,CHKLPT ;GO VERIFY ARGS
STOR C,LPTMX,(B) ;SET IT
RET ;AND DONE
;ROUTINES TO DO DTE POSTING
;ROUTINE TO HANDLE ACK
LPTDON::JSP CX,CHKLPT ;MAKE SURE IS VALID LPT
JUMPL B,DONALL ;IF NEGATIVE, GO ACK THEM ALL
SETZRO LPTFE,(B) ;CLEAR BYTE COUNT
JE LPTBL,(B),R ;DID A DTEQ FAIL?
SETZRO LPTBL,(B) ;CLEAR BLOCK INDIACTOR
SETZ A, ;FAKE INT WITH NO CHARS SENT
CALL LPTINT ;TRY SENDING IT AGAIN
RET ;AND DONE
;HERE IF WE ARE TO ACK ALL LPTS
DONALL: STKVAR <SAVEE>
MOVSI C,-LPTN ;DO ALL LPTS
DONAL1: MOVEM C,SAVEE
MOVEI B,0(C) ;UNIT
CALL LPTDON ;GO ACK THIS GUY
MOVE C,SAVEE
AOBJN C,DONAL1 ;DO ALL OF THEM
RET ;AND DONE
> ;END IFN KLFLG
TNXEND
END