.MCALL .MODULE .MODULE SETPRE,VERSION=08,COMMENT=,IDENT=NO,TITLE=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only 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 except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ; ; AUTHOR: D.B. FINGERHUT 28-Aug-84 ; ;19-Oct-1990 JFW surround error messages with ;+;ERROR ... ;- .MCALL .RCTRLO,.TTYOUT,.EXIT,.PRINT,.GTLIN,.TTYIN .MCALL .MRKT,.QSET,.GTIM,.GVAL,.LOOKUP,.FETCH, .ENTER .MCALL .DSTATUS,.WRITW,.CLOSE,.READW,.SPFUN,.DATE .MCALL .TTINR,.SCCA,.TRPSET,.SDTTM,.CHAIN,.PURGE .MCALL .SETTOP ; --------------------------------------------------------------- ; .LIBRARY "SRC:SYSTEM.MLB" ; this can't be done until ; .MCALL .FIXDF, .CF2DF ; ULBMAC is changed - there ; ; are conflicts with DSECT, ; .FIXDF ; DB, etc. ; .CF2DF ; --------------------------------------------------------------- $SYPTR =: 54 ;SYSCOM pointer to RMON $USRLC =: 266 ;Offset in RMON to USR area $CNFG1 =: 300 ;Config word CLK50$ =: 40 ;50 cycle clock bit $CNFG2 =: 370 ;Offset in RMON to config word 2 BUS$M =: 20100 ;Mask for bus bits ;IHZ BUS$C =: 20000 ;Value for CTI bus ;IHZ $HSUFF =: 412 ;Offset in RMON to handler suffix $SPSTA =: 414 ;Offset in RMON to SPOOL status word SP$ACT =: 000200 ;SPOOL ACTIVE bit (not defined correctly ; in SYSTEM.MAC SP$NOF =: 003400 ;Override with NO_FLAG_PAGE bits (notinSYSTEM) $GETVE =: 436 ;Offset in RMON to GETVEC routine addr ; --------------------------------------------------------------- .NLIST .INCLUDE "SRC:PISET.MAC" .LIST ; me SETTYP ,OFFSET,YES SETDAT SETTYP ,OFFSET,YES SETANS SETTYP ,OFFSET,YES SETKBD SETTYP ,OFFSET,YES SETFNT SETTYP ,OFFSET,YES SETTAB SETTYP ,OFFSET,YES SETSET PISFUN ;+ ;ERROR .MACRO SPFUN AREA,CHAN,FUNC,BUF,WCNT,BLK,FNAME,?L1 .SPFUN AREA,CHAN,FUNC,BUF,WCNT,BLK BCC L1 .ERR #ERRARE,#FE.SYS,LEVEL=F,RETURN=NO,FILE=FNAME L1: .ENDM .MACRO READW AREA,CHAN,BUF,WCNT,BLK,FNAME,?L1,?L2 .READW AREA,CHAN,BUF,WCNT,BLK BCC L1 MOV #FE.INE,R1 ;Assume Input error MOVB @#S$EERB,R4 ;R4 = error byte CMPB #1,R4 ;Is it a 1? BEQ L2 ;Branch if so MOV #FE.CNO,R1 ;Assume Channel not open CMPB #2,R4 ;Is it a 2? BEQ L2 ;Branch if so MOV #FE.EOF,R1 ;Output error L2: .ERR #ERRARE,R1,LEVEL=F,RETURN=NO,FILE=FNAME ; <-F-Input error> ; <-F-Channel not open> ; <-F-Unexpected EOF> L1: .ENDM .MACRO WRITW AREA,CHAN,BUF,WCNT,BLK,FNAME,?L1,?L2 .WRITW AREA,CHAN,BUF,WCNT,BLK BCC L1 MOV #FE.OPE,R1 ;Assume Output error MOVB @#S$EERB,R4 ;R4 = error byte CMPB #1,R4 ;Is it a 1? BEQ L2 ;Branch if so MOV #FE.CNO,R1 ;Assume Channel not open CMPB #2,R4 ;Is it a 2? BEQ L2 ;Branch if so MOV #FE.EOF,R1 ;Output error L2: .ERR #ERRARE,R1,LEVEL=F,RETURN=NO,FILE=FNAME ; <-F-Output error> ; <-F-Channel not open> ; <-F-Unexpected EOF> L1: .ENDM .MACRO LOOKUP AREA,CHAN,FNAME,?L1,?L2 .LOOKUP AREA,CHAN,FNAME BCC L1 MOVB @#S$EERB,R4 ;R4 = error byte MOV #FE.FNF,R1 ;Assume File not found CMPB #1,R4 ;Is it a 1? BEQ L2 ;Branch if so MOV #FE.CIU,R1 ;Assume Channel in use TST R4 ;Is it a 0? BEQ L2 ;Branch if so MOV #FE.SYS,R1 ;System error L2: .ERR #ERRARE,R1,LEVEL=F,RETURN=NO,FILE=FNAME ; <-F-File not found> ; <-F-Channel in use> ; <-F-System error> L1: .ENDM ;-