.ENABLE LC .TITLE ERRMSG SUBROUTINE ERRMSG ( ERRTXT , IERR ) .IDENT /V01.00/ ;*********************************************************************** ; ; Description : Print an message on the user terminal ; The error message is displayed as follows : ; taskname -- message (Err= ) ; ; Arguments : ERRTXT = BYTE array containg message closed with NULL-byte ; IERR = errornumber (0=no errornumber) ; ; Author : T.Pijl ; AKZO PHARMA, Oss Holland ; dep. SDA ; ; Version : V1.0 Date : 13-dec-82 ; ; Module name : ERRMSG.MAC ; ; Package : RSX-LIBRARY ; ; Compilation/ ; taskbuilding : MAC ERRMSG ; ; Updates : name version ; ; description : ; ;************************************************************************ .PAGE .SBTTL Macro defintions and routine coding ; ; Macro definitions ; ; ; Routine coding ; ERRMSG:: MOV 2(R5),R0 TST @4(R5) BEQ 2$ MOV #TEXT,R0 ;IERR # 0,so copy ERRTXT and add IERR MOV 2(R5),R1 1$: MOVB (R1)+,(R0)+ ;copy ERRTXT to TEXT BNE 1$ TSTB -(R0) ;pointer on NULL-byte MOVB #40,(R0)+ ;add ' (Err=' to TEXT MOVB #'(,(R0)+ MOVB #'E,(R0)+ MOVB #162,(R0)+ MOVB #162,(R0)+ MOVB #'=,(R0)+ CLR R2 ;add converted IERR to TEXT MOV @4(R5),R1 CALL $CBDSG MOVB #'),(R0)+ CLRB (R0) MOV #TEXT,R0 2$: CLR -(SP) ;put text on terminal TI: MOV R0,-(SP) MOV SP,R0 CLR R1 JSR PC,$ERRLG CMP (SP)+,(SP)+ RTS PC ; ; Data area ; TEXT: .BLKB 80. .END