Trailing-Edge
-
PDP-10 Archives
-
decuslib10-06
-
43,50414/ipcf10.mac
There are no other files named ipcf10.mac in the archive.
TITLE IPCF - FORTRAN 10 CALLABLE IPCF ROUTINES (M BARNES)
SUBTTL IPCFS ROUTINE TO SEND IPCF PACKET
ENTRY IPCFS,IPCFR,IPCFQ
A=0
B=1
;IPCFS
;
;PROCEDURE TO SEND IPCF PACKET
;
;CALL:
; X = IPCFS(FLAGS,SENDP,RECP,MESS,LEN)
;
;WHERE:
; FLAGS FLAG WORD
; SENDP SENDERS PID
; RECP RECEIVERS PID
; MESS MESSAGE PACKET (ARRAY)
; LEN LENGHT OF MESS
;
IPCFS: MOVE A,@(16) ;GET FLAGS
MOVEM A,PACKET ;STORE IN PACKET[0] (.IPCFL)
MOVE A,@1(16) ;GET SENDERS PID
MOVEM A,PACKET+1 ;STORE IN PACKET[1] (.IPCFS)
MOVE A,@2(16) ;GET RECEIVERS PID
MOVEM A,PACKET+2 ;STORE IN PACKET[2] (.IPCFR)
HRRZ A,3(16) ;**[01] GET ADDR OF ARRAY
HRL A,@4(16) ;MOVE IN MESSAGE LENGTH
MOVEM A,PACKET+3 ;STORE IN PACKET[3] (.IPCFP)
MOVE A,[4,,PACKET] ;GET READY TO SEND
IPCFS. A, ;DO IT
SKIPA ;ERROR - RETURN WITH CODE IN AC
SETZ A, ;OK - RETURN WITH 0 IN AC
POPJ 17, ;GO HOME
SUBTTL IPCFR ROUTINE TO RECEIVE IPCF PACKET
;IPCFR
;
;PROCEDURE TO RECEIVE IPCF PACKET
;
;CALL:
; X = IPCFR(FLAGS,SENDP,RECP,MESS,LEN,SENPPN,CAP)
;
;WHERE:
; FLAGS FLAG WORD
; SENDP SENDERS PID (RETURNED)
; RECP RECEIVERS PID (RETURNED)
; MESS MESSAGE PACKET (ARRAY)
; LEN LENGTH OF MESS
; SENPPN SENDERS PPN (RETURNED)
; CAP SENDERS CAPABILITIES (RETURNED)
;
IPCFR: MOVE A,@(16) ;GET FLAGS
MOVEM A,PACKET ;PUT IN PACKET[0]
MOVEI A,0 ;SET AC TO ZERO
MOVEM A,PACKET+1 ;CLEAR SENDERS PID
MOVEM A,PACKET+2 ;CLEAR RECIEVERS PID
MOVEM A,PACKET+4 ;CLEAR SENDERS PPN
MOVEM A,PACKET+5 ;CLEAR SENDERS CAPABILITIES
HRRZ A,3(16) ;**[01] GET ADDR OF ARRAY
HRL A,@4(16) ;MOVE IN MESSAGE LENGTH
MOVEM A,PACKET+3 ;STORE IN PACKET[3] (.IPCFP)
MOVE A,[6,,PACKET] ;GET READY TO SEND
IPCFR. A, ;DO IT
POPJ 17, ;RETURN WITH ERROR CODE IN AC
MOVEM A,STORE# ;STORE AC
MOVE A,PACKET ;GET FLAGS
MOVEM A,@(16) ;GIVE TO CALLER
MOVE A,PACKET+1 ;GET SENDERS PID
MOVEM A,@1(16) ;GIVE TO CALLER
MOVE A,PACKET+2 ;GET RECEIVERS PID
MOVEM A,@2(16) ;GIVE TO CALLER
MOVE A,PACKET+4 ;GET SENDERS PPN
MOVEM A,@5(16) ;GIVE TO CALLER
MOVE A,PACKET+5 ;GET SENDERS CAPABILITIES
MOVEM A,@6(16) ;GIVE TO CALLER
MOVE A,STORE ;RESTORE AS. VAR. (IF ANY)
POPJ 17, ;GO HOME
SUBTTL IPCFQ ROUTINE TO QUERY IPCF PACKET
;IPCFQ
;
;PROCEDURE TO QUERY IPCF PACKET
;
;CALL:
; X = IPCFQ(FLAGS,SENDP,RECP,MESWRD,SENPPN,CAP)
;
;WHERE:
; FLAGS FLAG WORD
; SENDP SENDERS PPN
; RECP RECEIVERS PID
; MESWRD LENGTH,,ADDR
; SENPPN SENDERS PPN
; CAP SENDERS CAPABLITIES
;
IPCFQ: MOVE A,[6,,PACKET] ;SET UP FOR CALL
IPCFQ. A, ;CALL
POPJ 17, ;ERROR - RETURN WITH CODE IN AC
MOVE A,PACKET ;GET FLAGS
MOVEM A,@(16) ;GIVE TO CALLER
MOVE A,PACKET+1 ;GET SENDERS PID
MOVEM A,@1(16) ;GIVE TO CALLER
MOVE A,PACKET+2 ;GET RECEIVERS PID
MOVEM A,@2(16) ;GIVE TO CALLER
MOVE A,PACKET+3 ;GET MESWRD
MOVEM A,@3(16) ;GIVE TO CALLER
MOVE A,PACKET+4 ;GET SENDERS PPN
MOVEM A,@4(16) ;GIVE TO CALLER
MOVE A,PACKET+5 ;GET SENDERS CAP
MOVEM A,@5(16) ;GIVE TO CALLER
MOVEI A,0 ;MAKE SURE NO ERROR
POPJ 17, ;GO HOME
PACKET: BLOCK 6 ;FLAGS
;SENDERS PID
;RECEIVERS PID
;LENGTH,,ADDR
;PPN OF SENDER
;CAPABILITIES OF SENDER
END