;***************************************************************************** .title TMS... RECIEVER FOR TMS .ident /V1.0/ .nlist bex,ME,CND .ENABL LC .sbttl Author's Credits ;+ Author: Henry R. Tumblin ; ; Date: 7-Nov-78 ; ; Version: 1.0 ; ; Machine/System: PDP-11/70 IAS V2.0 ; ; Type/Language: Main/Assembler(MACRO) ; ; Residence: DB1:[1,20]TMES1.* ; ; Build File: TMES1.CMD ; ; Abstract: This program provides the message writting ability ; of the TMS task for non-priviledged users. ; ; Edits: ; ; Date By Reason ; ---------- ----- -------------------------------------------------- ; NONE ;- ;***************************************************************************** .sbttl define the libmacs needed .mcall print,alun$,qiow$,vrcx$,dir$ .MCALL CHRS,C$C C$C WRITE: QIOW$ IO.WVB!TF.WBT,1,1,200,,,<0,0,40> ; Qio for TT I/O alun: ALUN$ 1,TT,0 ; dummy assign lun att: QIOW$ io.att,1,2,200,,,<0,0,0> ; Attach to the terminal det: QIOW$ io.det,1,2,200,,,<0,0,0> ; Detach from the terminal RECBUF: ; Start of receive buffer FRMTSK: .BLKW 2 ; From task name in RAD-50 FRMDEV: .BLKW 1 ; From device name FRMNUM: .BLKW 1 ; From device # DEVNAM: .BLKW 1 ; To device name DEVNUM: .BLKW 1 ; To device # FRMSIZ: .BLKW 1 ; Size of from message in bytes FRMMES: .BLKB 16. ; From message TOOSIZ: .BLKW 1 ; Too message size TOOMES: .BLKB 80. ; Too message. RECBFS=<.-RECBUF>/2 ; Get word length RECV: VRCX$ $$$TMS,RECBUF,RECBFS ; Variable length receive DPB MSG1: .ASCII "Message from " MSGBF: .ASCII "?" .BLKB 15. .ASCII " on " DEVBF: .BLKW 1 .BLKB 4 .ASCII <0> MESGBF: .BLKB 80. MSG1S=.-MSG1 .Sbttl Main line code ;***************************************************************************** START: DIR$ #RECV ; receive data or exit MOV DEVNAM,ALUN+A.LUNA ; Set the output device name MOV DEVNUM,ALUN+A.LUNU ; And unit number DIR$ #ALUN ; ASSIGN THE LUN DIR$ #ATT ; attach to the device MOV FRMSIZ,R0 ; Setup to move to output str. BEQ 10$ ; Eq, then skip moving string MOV #FRMMES,R1 ; Get src string pointer MOV #MSGBF,R2 ; Get dst string pointer 20$: MOVB (R1)+,(R2)+ ; Mov a byte SOB R0,20$ ; Loop till thru 10$: MOV FRMDEV,DEVBF ; Set the from device name MOV #DEVBF+2,R0 ; Set pointer for conversion MOV FRMNUM,R1 ; Set device number in R1 CLR R2 ; Suppress leading zeros CALL $CBOMG ; convert to ASCII MOVB #':,(R0) ; Append a colon to string MOV #TOOMES,R1 ; Get src pntr MOV TOOSIZ,R2 ; Get string length MOV #MESGBF,R0 ; Set dst pntr 30$: MOVB (R1)+,(R0)+ ; Move a byte SOB R2,30$ ; Loop until thru PRINT #MSG1,#MSG1S ; Print the From message DIR$ #DET ; deattach terminal JMP START ; and see if any more to do .end start ; and end it all ;*****************************************************************************