

                22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 1   

					UBAREG.FOR.4        



0001    	SUBROUTINE UBAREG(LUN,REG)

0002    	BYTE		LUN

0003    	INTEGER*4	REG(4)

         

        C

        C	INCLUDE FILES:

        C

        C			NONE

         

        C

        C	EQUATED SYMBOLS

        C

0004    	PARAMETER	UBA_DP_NUM = 1

0005    	PARAMETER	UBA_DP_REG = 2

0006    	PARAMETER	UBA_FINAL = 3

0007    	PARAMETER	UBA_PREV = 4

         

        C

        C	OWN STORAGE:

        C

0008    	INTEGER*4	L_BUBA

0009    	INTEGER*2	W_BUFUAD

0010    	BYTE		B_BFST

        C

        C	EXTERNAL ROUTINES:

        C

0011    	INTEGER*2	BITCNT

         

         

0012    	CALL LINCHK(LUN, 7 + BITCNT(REG(UBA_DP_REG),'E0000000'X)

        	1			+ BITCNT(REG(UBA_DP_REG),'00FF0000'X))

         

0013    	WRITE(LUN,101)  '0UBA REGISTERS:'

         

0014    	IF(REG(UBA_DP_NUM) .EQ. 0)

        	1	THEN

0015    			WRITE(LUN,51) REG(UBA_DP_NUM),REG(UBA_DP_REG)

0016    			GO TO 100

0017    	ENDIF

         

0018    	L_BUBA	= ISHFT(IAND(REG(UBA_DP_REG),'FFFF'X),2)

         

0019    	WRITE(LUN,51)  REG(UBA_DP_NUM),REG(UBA_DP_REG),L_BUBA

0020     51	FORMAT(' ',T10,'DPR',I2,'. :',T23,Z8:,T40,'BUBA = ',O6,' octal')

         

         

0021    	IF(IAND(REG(UBA_DP_REG),'80000000'X) .EQ. '80000000'X)

        	1	THEN

0022    			WRITE(LUN,102)  'Buffer not empty'

0023    		ELSE

0024    			WRITE(LUN,102)  'Buffer empty'

0025    	ENDIF

         

0026    	IF(IAND(REG(UBA_DP_REG),'40000000'X) .EQ. '40000000'X)

        	1		WRITE(LUN,102)  'Buffer transfer error'

         



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 2   

					UBAREG.FOR.4        



0027    	IF(IAND(REG(UBA_DP_REG),'20000000'X) .EQ. '20000000'X)

        	1	THEN

0028    			WRITE(LUN,102)  'Memory Write'

0029    		ELSE

0030    			WRITE(LUN,102)  'Memory Read'

0031    	ENDIF

         

0032    	DO 70, I=23,16,-1

0033    	   IF(IAND(REG(UBA_DP_REG),2**I) .EQ. 2**I)

        	1	WRITE(LUN,63)  (I-16)

0034     63		FORMAT(' ',T40,'UBA buffer',I2,'full')

0035     70	CONTINUE

         

         

0036     100	CONTINUE

         

0037    	WRITE(LUN,101)  '0UBA MAPPING REGISTERS:'

0038    	WRITE(LUN,101)  ' ','FINAL:',REG(UBA_FINAL)

0039    	WRITE(LUN,101)  ' ','PREV:',REG(UBA_PREV)

         

0040     101	FORMAT(A:,T10,A,T23,Z8)

0041     102	FORMAT(' ',T40,A)

         

0042    	RETURN

0043    	END



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 3   

					UBAREG.FOR.4        



		.TITLE	UBAREG

		.IDENT	01



    0000	.PSECT	$PDATA

    0000	.LONG	^XE0000000

    0004	.LONG	^X00FF0000

    0008	.XBYTE	30,55,42,41,20,52,45,47,49,53,54,45,52,53,3A

    0017	.LONG	^X00000002

    001B	.XBYTE	42,75,66,66,65,72,20,6E,6F,74,20,65,6D,70,74,79

    002B	.XBYTE	42,75,66,66,65,72,20,65,6D,70,74,79

    0037	.XBYTE	42,75,66,66,65,72,20,74,72,61,6E,73,66,65,72,20

    0047	.XBYTE	65,72,72,6F,72

    004C	.XBYTE	4D,65,6D,6F,72,79,20,57,72,69,74,65

    0058	.XBYTE	4D,65,6D,6F,72,79,20,52,65,61,64

    0063	.XBYTE	30,55,42,41,20,4D,41,50,50,49,4E,47,20,52,45,47

    0073	.XBYTE	49,53,54,45,52,53,3A

    007A	.XBYTE	20

    007B	.XBYTE	46,49,4E,41,4C,3A

    0081	.XBYTE	50,52,45,56,3A



    000C	.PSECT	$LOCAL

    000C	.LONG	^X04080004

    0010	.LONG	^X00000000

    0014	.LONG	^X01200000,^X00000010

    001C	.LONG	^X00000000

    0020	.LONG	^X00000002

    0024	.LONG	^X00000000

    0028	.ADDR	$PDATA

    002C	.LONG	^X00000002

    0030	.LONG	^X00000000

    0034	.ADDR	$PDATA+^X4

    0038	.LONG	^X00000002

    003C	.LONG	^X00000000

    0040	.LONG	^X00000000

    0044	.LONG	^X010E000F

    0048	.ADDR	$PDATA+^X8

    004C	.LONG	^X00000002

    0050	.LONG	^X00000000

    0054	.ADDR	$PDATA+^X17

    0058	.LONG	^X010E0010

    005C	.ADDR	$PDATA+^X1B

    0060	.LONG	^X010E000C

    0064	.ADDR	$PDATA+^X2B

    0068	.LONG	^X010E0015

    006C	.ADDR	$PDATA+^X37

    0070	.LONG	^X010E000C

    0074	.ADDR	$PDATA+^X4C

    0078	.LONG	^X010E000B

    007C	.ADDR	$PDATA+^X58

    0080	.LONG	^X010E0017

    0084	.ADDR	$PDATA+^X63

    0088	.LONG	^X010E0001

    008C	.ADDR	$PDATA+^X7A

    0090	.LONG	^X010E0006

    0094	.ADDR	$PDATA+^X7B

    0098	.LONG	^X010E0005



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 4   

					UBAREG.FOR.4        



    009C	.ADDR	$PDATA+^X81



    0086	.PSECT	$PDATA

    0086  .51:

    0086	.XBYTE	0F,01,20,0D,0A,0F,03,44,50,52,18,02,0F,03,2E,20

    0096	.XBYTE	3A,0D,17,19,08,07,0D,28,0F,07,42,55,42,41,20,3D

    00A6	.XBYTE	20,17,06,0F,06,20,6F,63,74,61,6C,04

    00B2  .63:

    00B2	.XBYTE	0F,01,20,0D,28,0F,0A,55,42,41,20,62,75,66,66,65

    00C2	.XBYTE	72,18,02,0F,04,66,75,6C,6C,04

    00CC  .101:

    00CC	.XBYTE	29,07,0D,0A,29,0D,17,19,08,04

    00D6  .102:

    00D6	.XBYTE	0F,01,20,0D,28,29,04



    0000	.PSECT	$CODE

    0000  UBAREG::

    0000	.WORD	^M<IV,R8,R9,R10,R11>

    0002	MOVAL	$LOCAL+^X4, R11

    0009	MOVL	REG(AP), $LOCAL+^X10(R11)

    000E	SUBL3	#4, REG(AP), $LOCAL+^X1C(R11)

									    ; 0012

    0014	MOVAB	@LUN(AP), $LOCAL+^X3C(R11)

    0019	MOVAL	@$LOCAL+^X1C(R11), R8

    001D	MOVAL	8(R8), $LOCAL+^X24(R11)

    0022	CALLG	$LOCAL+^X20(R11), BITCNT

    002A	ADDW2	#7, R0

    002D	MOVW	R0, -(SP)

    0030	MOVAL	8(R8), $LOCAL+^X30(R11)

    0035	CALLG	$LOCAL+^X2C(R11), BITCNT

    003D	ADDW2	(SP)+, R0

    0040	MOVW	R0, -(SP)

    0043	MOVL	SP, $LOCAL+^X40(R11)

    0047	CALLG	$LOCAL+^X38(R11), LINCHK

    004F	ADDL2	#2, SP

									    ; 0013

    0052	PUSHAL	.101

    0058	CVTBL	@LUN(AP), R10

    005C	PUSHL	R10

    005E	CALLS	#2, FOR$WRITE_SF

    0065	PUSHAB	$LOCAL+^X44(R11)

    0068	CALLS	#1, FOR$IO_T_DS

    006F	CALLS	#0, FOR$IO_END

									    ; 0014

    0076	TSTL	4(R8)

    0079	BNEQ	L$IAMF

									    ; 0015

    007B	PUSHAL	.51

    0081	PUSHL	R10

    0083	CALLS	#2, FOR$WRITE_SF

    008A	PUSHAL	4(R8)

    008D	CALLS	#1, FOR$IO_L_R

    0094	PUSHAL	8(R8)

    0097	CALLS	#1, FOR$IO_L_R

    009E	CALLS	#0, FOR$IO_END

									    ; 0016



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 5   

					UBAREG.FOR.4        



    00A5	BRW	.100

									    ; 0017

    00A8  L$IAMF:

									    ; 0018

    00A8	BICL3	#^XFFFF0000, 8(R8), -(SP)

    00B1	MOVL	SP, $LOCAL+^X50(R11)

    00B5	CALLG	$LOCAL+^X4C(R11), MTH$JISHFT

    00BD	ADDL2	#4, SP

    00C0	MOVL	R0, L_BUBA(R11)

									    ; 0019

    00C3	PUSHAL	.51

    00C9	PUSHL	R10

    00CB	CALLS	#2, FOR$WRITE_SF

    00D2	PUSHAL	4(R8)

    00D5	CALLS	#1, FOR$IO_L_R

    00DC	PUSHAL	8(R8)

    00DF	CALLS	#1, FOR$IO_L_R

    00E6	PUSHAL	L_BUBA(R11)

    00E8	CALLS	#1, FOR$IO_L_R

    00EF	CALLS	#0, FOR$IO_END

									    ; 0021

    00F6	BICL3	#^X7FFFFFFF, 8(R8), R0

    00FF	CMPL	R0, #-2147483648

    0106	BNEQ	L$IAOI

									    ; 0022

    0108	PUSHAL	.102

    010E	PUSHL	R10

    0110	CALLS	#2, FOR$WRITE_SF

    0117	PUSHAB	$LOCAL+^X58(R11)

    011A	CALLS	#1, FOR$IO_T_DS

    0121	CALLS	#0, FOR$IO_END

									    ; 0023

    0128	BRB	L$IAKJ

    012A  L$IAOI:

									    ; 0024

    012A	PUSHAL	.102

    0130	PUSHL	R10

    0132	CALLS	#2, FOR$WRITE_SF

    0139	PUSHAB	$LOCAL+^X60(R11)

    013C	CALLS	#1, FOR$IO_T_DS

    0143	CALLS	#0, FOR$IO_END

									    ; 0025

    014A  L$IAKJ:

									    ; 0026

    014A	BICL3	#^XBFFFFFFF, 8(R8), R0

    0153	CMPL	R0, #1073741824

    015A	BNEQ	L$IAAK

    015C	PUSHAL	.102

    0162	PUSHL	R10

    0164	CALLS	#2, FOR$WRITE_SF

    016B	PUSHAB	$LOCAL+^X68(R11)

    016E	CALLS	#1, FOR$IO_T_DS

    0175	CALLS	#0, FOR$IO_END

    017C  L$IAAK:

									    ; 0027

    017C	BICL3	#^XDFFFFFFF, 8(R8), R0



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 6   

					UBAREG.FOR.4        



    0185	CMPL	R0, #536870912

    018C	BNEQ	L$IAGK

									    ; 0028

    018E	PUSHAL	.102

    0194	PUSHL	R10

    0196	CALLS	#2, FOR$WRITE_SF

    019D	PUSHAB	$LOCAL+^X70(R11)

    01A0	CALLS	#1, FOR$IO_T_DS

    01A7	CALLS	#0, FOR$IO_END

									    ; 0029

    01AE	BRB	L$IAMK

    01B0  L$IAGK:

									    ; 0030

    01B0	PUSHAL	.102

    01B6	PUSHL	R10

    01B8	CALLS	#2, FOR$WRITE_SF

    01BF	PUSHAB	$LOCAL+^X78(R11)

    01C2	CALLS	#1, FOR$IO_T_DS

    01C9	CALLS	#0, FOR$IO_END

									    ; 0031

    01D0  L$IAMK:

									    ; 0032

    01D0	MOVL	#23, R9

    01D3  L$IAAM:

									    ; 0033

    01D3	PUSHL	R9

    01D5	PUSHL	#2

    01D7	CALLS	#2, OTS$POWJJ

    01DE	MOVL	R0, R10

    01E1	MCOML	8(R8), R0

    01E5	BICL3	R0, R10, R0

    01E9	CMPL	R0, R10

    01EC	BNEQ	L$IABN

    01EE	PUSHAL	.63

    01F4	CVTBL	@LUN(AP), -(SP)

    01F8	CALLS	#2, FOR$WRITE_SF

    01FF	SUBL3	#16, R9, -(SP)

    0203	CALLS	#1, FOR$IO_L_V

    020A	CALLS	#0, FOR$IO_END

    0211  L$IABN:

									    ; 0035

    0211	ACBL	#16, #-1, R9, L$IAAM

    021B	MOVL	R9, I(R11)

									    ; 0036

    021F  .100:

									    ; 0037

    021F	PUSHAL	.101

    0225	CVTBL	@LUN(AP), R9

    0229	PUSHL	R9

    022B	CALLS	#2, FOR$WRITE_SF

    0232	PUSHAB	$LOCAL+^X80(R11)

    0235	CALLS	#1, FOR$IO_T_DS

    023C	CALLS	#0, FOR$IO_END

									    ; 0038

    0243	PUSHAL	.101

    0249	PUSHL	R9



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 7   

					UBAREG.FOR.4        



    024B	CALLS	#2, FOR$WRITE_SF

    0252	PUSHAB	$LOCAL+^X88(R11)

    0256	CALLS	#1, FOR$IO_T_DS

    025D	PUSHAB	$LOCAL+^X90(R11)

    0261	CALLS	#1, FOR$IO_T_DS

    0268	MOVAL	@$LOCAL+^X1C(R11), R10

    026C	PUSHAL	12(R10)

    026F	CALLS	#1, FOR$IO_L_R

    0276	CALLS	#0, FOR$IO_END

									    ; 0039

    027D	PUSHAL	.101

    0283	PUSHL	R9

    0285	CALLS	#2, FOR$WRITE_SF

    028C	PUSHAB	$LOCAL+^X88(R11)

    0290	CALLS	#1, FOR$IO_T_DS

    0297	PUSHAB	$LOCAL+^X98(R11)

    029B	CALLS	#1, FOR$IO_T_DS

    02A2	PUSHAL	16(R10)

    02A5	CALLS	#1, FOR$IO_L_R

    02AC	CALLS	#0, FOR$IO_END

									    ; 0042

    02B3	RET	

		.END



UBAREG          22-Aug-1978 02:49:29	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 8   

					UBAREG.FOR.4        



PROGRAM SECTIONS



    Name                 Bytes   Attributes



  0 $CODE                  692   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG

  1 $PDATA                 221   PIC CON REL LCL   SHR NOEXE   RD NOWRT LONG

  2 $LOCAL                 160   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG





ENTRY POINTS



    Address  Type Name           



  0-00000000      UBAREG         





VARIABLES



    Address  Type Name               Address  Type Name               Address  Type Name               Address  Type Name           



  2-00000000  L*1 B_BFST           2-00000008  I*4 I               AP-00000004@ L*1 LUN              2-00000004  I*4 L_BUBA         

  2-00000002  I*2 W_BUFUAD       





ARRAYS



    Address  Type Name		       Bytes  Dimensions



 AP-00000008@ I*4 REG                     16  (4)





LABELS



    Address   Label       Address   Label       Address   Label       Address   Label       Address   Label       Address   Label   



  1-00000086  51'       1-000000B2  63'           **      70        0-0000021F  100       1-000000CC  101'      1-000000D6  102'    





FUNCTIONS AND SUBROUTINES REFERENCED



BITCNT            LINCHK            MTH$JISHFT     





Total Space Allocated = 1073 Bytes





COMPILER OPTIONS



/CHECK=(NOBOUNDS,OVERFLOW)

/DEBUG=(NOSYMBOLS,TRACEBACK)

/OPTIMIZE  /WARNINGS  /I4  /NOD_LINES  

