PREFIX          - INPUT SYMBIONT PREFIX FILE                     21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    3800  DECLARATIONS

   (1)    5900  GET NEXT CARD FROM READER

GETCARD         - INPUT SYMBIONT ROUTINE TO GET A CARD           21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   1

X0001           DECLARATIONS                                                                                                     (1)



                                     0000   100 	.TITLE	GETCARD - INPUT SYMBIONT ROUTINE TO GET A CARD

                                     0000   200 	.IDENT	"X0001"

                                     0000   300 

                                     0000   400 ;

                                     0000   500 ; COPYRIGHT (C) 1978

                                     0000   600 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000   700 ;

                                     0000   800 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000   900 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000  1000 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000  1100 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000  1200 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000  1300 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000  1400 ; REMAIN IN DEC.

                                     0000  1500 ;

                                     0000  1600 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000  1700 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000  1800 ; CORPORATION.

                                     0000  1900 ;

                                     0000  2000 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000  2100 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000  2200 

                                     0000  2300 ;++

                                     0000  2400 ;

                                     0000  2500 ; FACILITY:  VAX/VMS INPUT SYMBIONT

                                     0000  2600 ;

                                     0000  2700 ; ABSTRACT:	THIS MODULE CONTAINS THE ROUTINES TO READ,

                                     0000  2800 ;		DOUBLE BUFFERING, FROM THE CARD READER (SYS$INPUT).

                                     0000  2900 ;

                                     0000  3000 ;

                                     0000  3100 ; ENVIRONMENT:	USER MODE

                                     0000  3200 ;

                                     0000  3300 ;

                                     0000  3400 ; AUTHOR:	LEN KAWELL, CREATION DATE: 8-MAR-78

                                     0000  3500 ;

                                     0000  3600 ; MODIFIED BY:

                                     0000  3700 ;

                                     0000  3800 ;  , VERSION  ,

                                     0000  3900 ; 01	- 

                                     0000  4000 ;--

                                     0000  4100 

                                     0000  4200 ;

                                     0000  4300 ; INCLUDE FILES:

                                     0000  4400 ;

                                     0000  4500 ;	[INPSMB.SRC]PREFIX.MAR

                                     0000  4600 ;

                                     0000  4700 ; MACROS:

                                     0000  4800 ;

                                     0000  4900 

                                     0000  5000 ;

                                     0000  5100 ; EQUATED SYMBOLS:

                                     0000  5200 ;

                                     0000  5300 

                                     0000  5400 ;

                                     0000  5500 ; OWN STORAGE:

                                     0000  5600 ;

                                     0000  5700 

GETCARD         - INPUT SYMBIONT ROUTINE TO GET A CARD           21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   2

X0001           GET NEXT CARD FROM READER                                                                                        (1)



                                     0000  5900 	.SBTTL	GET NEXT CARD FROM READER

                                     0000  6000 ;++

                                     0000  6100 ;

                                     0000  6200 ; FUNCTIONAL DESCRIPTION:

                                     0000  6300 ;

                                     0000  6400 ;	WAITS FOR PREVIOUS QIO TO COMPLETE, PASSES THE ADDRESS OF

                                     0000  6500 ;	THAT DATA TO THE CALLER, TOGGLES THE BUFFER INDEX, AND

                                     0000  6600 ;	QUEUES ANOTHER READ QIO.

                                     0000  6700 ;

                                     0000  6800 ; CALLING SEQUENCE:

                                     0000  6900 ;

                                     0000  7000 ;	BSB	INP$GETCARD

                                     0000  7100 ;	BSB	INP$STARTCARD		(USED IF JUST STARTING READING)

                                     0000  7200 ;

                                     0000  7300 ; INPUT PARAMETERS:

                                     0000  7400 ;

                                     0000  7500 ;	R2 CONTAINS INDEX INTO BUFFER ADDRESS VECTOR (ONLY FOR INP$STARTCARD)

                                     0000  7600 ;	R11 CONTAINS ADDRESS OF INP$G_DATA

                                     0000  7700 ;

                                     0000  7800 ; IMPLICIT INPUTS:

                                     0000  7900 ;

                                     0000  8000 ;	ID_Q_TIMEOUT(R11) CONTAINS TIMEOUT TIME

                                     0000  8100 ;	ID_B_INBUF_INDX(R11) CONTAINS INDEX INTO BUFFER ADDRESS VECTOR

                                     0000  8200 ;

                                     0000  8300 ; OUTPUT PARAMETERS:

                                     0000  8400 ;

                                     0000  8500 ;	R6 CONTAINS BYTE COUNT OF DATA

                                     0000  8600 ;	R7 CONTAINS ADDRESS OF DATA

                                     0000  8700 ;

                                     0000  8800 ; IMPLICIT OUTPUTS:

                                     0000  8900 ;

                                     0000  9000 ;	NONE

                                     0000  9100 ;

                                     0000  9200 ; COMPLETION CODES

                                     0000  9300 ;

                                     0000  9400 ;	R0 CONTAINS QIO COMPLETION STATUS (0 IF IT TIMED-OUT)

                                     0000  9500 ;

                                     0000  9600 ; SIDE EFFECTS:

                                     0000  9700 ;

                                     0000  9800 ;	ANOTHER REQUEST IS QUEUED FOR READER

                                     0000  9900 ;

                                     0000 10000 ;--

                                     0000 10100 

                                     0000 10200 	PURE_SECTION

                                     0000 10300 

                                     0000 10400 INP$GETCARD::

                                     0000 10500 

                                     0000 10600 	$SETIMR_S #INP$K_TIMEFN,-	;SET TIMEOUT TIMER

                                     0000 10700 		ID_Q_TIMEOUT(R11)

                                     0010 10800 	$WFLOR_S #INP$K_CREFN,-		;WAIT FOR COMPLETION/TIMEOUT

                                     0010 10900 		#<INP$K_CREFN!INP$K_TIMEFN>@1

                                     001B 11000 	$CANTIM_S			;CANCEL THE TIMER QUEUE REQUEST

            52         32 AB     9A  0026 11100 	MOVZBL	ID_B_INBUF_INDX(R11),R2	;GET INPUT BUFFER INDEX

            57   00000000'EF42   D0  002A 11200 	MOVL	INP$G_INBUF_ADD[R2],R7	;SET BUFFER ADDRESS

            56         04 AB     9A  0032 11300 	MOVZBL	ID_Q_IOSB+2(R11),R6	;SET BYTE COUNT

         41 AB            03     E1  0036 11305 	BBC	#FLAG_V_NOTRAIL,ID_L_FLAGS(R11),GET_STATUS ;BR IF NOT TRAILING BLANK REMOVAL

                          0C         003A       

GETCARD         - INPUT SYMBIONT ROUTINE TO GET A CARD           21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   3

X0001           GET NEXT CARD FROM READER                                                                                        (1)



                                     003B 11310 					;ELIMINATE TRAILING BLANKS

            51            6746   9E  003B 11320 	MOVAB	(R7)[R6],R1		;GET ADDR OF END OF CARD

            20            71     91  003F 11330 10$:	CMPB	-(R1),#^A\ \		;IS CHARACTER A BLANK?

                          03     12  0042 11340 	BNEQU	GET_STATUS		;BR IF NOT - BLANKS ELIMINATED

            F8            56     F5  0044 11350 	SOBGTR	R6,10$			;DECREMENT BYTE COUNT - TRY NEXT

                                     0047 11360 

                                     0047 11370 GET_STATUS:

            7E         02 AB     3C  0047 11400 	MOVZWL	ID_Q_IOSB(R11),-(SP)	;GET COMPLETION STATUS

                          0D     13  004B 11500 	BEQL	10$			;BR IF TIMED-OUT

            6E       0000'8F     B1  004D 11600 	CMPW	#SS$_ENDOFFILE,(SP)	;END-OF-FILE CARD?

                          06     13  0052 11700 	BEQLU	10$			;BF IF YES

                          FFA9'  30  0054 11800 	BSBW	INP$EOJ			;IS CARD $EOJ?

            22            50     E9  0057 11900 	BLBC	R0,20$			;BR IF NOT

                                     005A 12000 10$:	$QIO_S	FUNC=#IO$_SETMODE,-	;RESET TRANSLATION MODE

                                     005A 12010 		CHAN=ID_W_CRCHAN(R11),-	;

                                     005A 12020 		P1=ID_T_CHAN_INFO+4(R11)

                          6E     D5  0078 12030 	TSTL	(SP)			;PREVIOUS READ TIME-OUT?

                          03     13  007A 12040 	BEQL	30$			;BR IF YES

                          0004   30  007C 12100 20$:	BSBW	INP$STARTCARD		;START READING THE NEXT CARD

            50            8E     D0  007F 12200 30$:	MOVL	(SP)+,R0		;RESTORE STATUS OF LAST CARD

                                 05  0082 12300 	RSB				;RETURN

                                     0083 12400 

                                     0083 12500 ;

                                     0083 12600 ; START NEXT READ

                                     0083 12700 ;

                                     0083 12800 INP$STARTCARD::

            52            01     CC  0083 12900 	XORL	#1,R2			;TOGGLE BUFFER INDEX

         32 AB            52     90  0086 13000 	MOVB	R2,ID_B_INBUF_INDX(R11)	;SAVE NEW INDEX

            52       0000'CF42   D0  008A 13100 	MOVL	W^INP$G_INBUF_ADD[R2],R2 ;GET ADDRESS OF NEXT BUFFER

                                     0090 13200 	$QIO_S	EFN=#INP$K_CREFN,-	;EVENT FLAG NUMBER

                                     0090 13300 		CHAN=ID_W_CRCHAN(R11),-	;CHANNEL NUMBER

                                     0090 13400 		FUNC=#IO$_READVBLK,-	;READ FUNCTION

                                     0090 13500 		IOSB=ID_Q_IOSB(R11),-	;I/O STATUS BLOCK

                                     0090 13600 		P1=(R2),-		;BUFFER ADDRESS

                                     0090 13700 		P2=#80			;80 BYTES

                                 05  00B2 13800 	RSB				;RETURN

                                     00B3 13900 

                                     00B3 14000 	.END

GETCARD         - INPUT SYMBIONT ROUTINE TO GET A CARD           21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   4

SYMBOL TABLE                                                                                                                     (1)



$$T1           = 00000001            SYS$WFLOR        ********   X   03   

BIT...         = 00000012            

FLAG_M_CREATED = 00020000            

FLAG_M_INITOK  = 00010000            

FLAG_M_JOB     = 00000001            

FLAG_M_NAME    = 00000002            

FLAG_M_NODEL   = 00000004            

FLAG_M_NOTRAIL = 00000008            

FLAG_V_CREATED = 00000011            

FLAG_V_INITOK  = 00000010            

FLAG_V_JOB     = 00000000            

FLAG_V_NAME    = 00000001            

FLAG_V_NODEL   = 00000002            

FLAG_V_NOTRAIL = 00000003            

GBL...         = 00000000            

GET_STATUS       00000047 R     03   

ID_B_INBUF_INDX  00000032            

ID_K_SIZE        000001D1            

ID_L_FLAGS       00000041            

ID_L_OPT_PTR     0000003D            

ID_Q_ACCNT_DESC  0000001A            

ID_Q_IOSB        00000002            

ID_Q_JOBNM_DESC  00000022            

ID_Q_PASSW_DESC  0000000A            

ID_Q_TIMEOUT     00000033            

ID_Q_UNAME_DESC  00000012            

ID_T_CHAN_INFO   00000045            

ID_T_DEF_DIR     00000051            

ID_T_JOB_CARD    000000D1            

ID_T_PASSWORD    0000002A            

ID_W_CRCHAN      00000000            

ID_W_MBCHAN      0000003B            

INP$EOJ          ********   X   03   

INP$GETCARD      00000000 RG    03   

INP$G_INBUF_ADD  ********   X   03   

INP$K_CREFN    = 00000001            

INP$K_GENEFN   = 00000000            

INP$K_JOBCRDSZ = 00000100            

INP$K_MAXRSS   = 00000080            

INP$K_OPTBUFSZ = 00000048            

INP$K_TIMEFN   = 00000002            

INP$K_UAFBUFSZ = 00000100            

INP$STARTCARD    00000083 RG    03   

IO$_READVBLK     ********   X   03   

IO$_SETMODE      ********   X   03   

SM_K_SIZE        0000008A            

SM_T_DEVNAME     00000012            

SM_T_FILENAME    0000002E            

SM_T_OPTIONS     00000042            

SM_T_QUEUE       00000002            

SM_W_DIRID       00000028            

SM_W_FILEID      00000022            

SM_W_REQUEST     00000000            

SS$_ENDOFFILE    ********   X   03   

SYS$CANTIM       ********   X   03   

SYS$QIO          ********   X   03   

SYS$SETIMR       ********   X   03   

GETCARD         - INPUT SYMBIONT ROUTINE TO GET A CARD           21-AUG-1978 21:38:48   VAX-11 MACRO X0.3-11               Page   5

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            000001D1      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

INP_PURE         000000B3      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

23036. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:GETCARD,LIS$:GETCARD/-SP=SRC$:PREFIX,SRC$:GETCARD

2 MLB DIR RDS - 137 GETS TO DEFINE 14 MACROS. 8 INTER. FILE WRITES. 

