CALCTV          - CALCULATES ANSI TAPE VERSION                   21-AUG-1978 23:24:14   VAX-11 MACRO X0.3-11               Page   1

A0001                                                                                                                            (1)



                                     0000     1 	.TITLE	CALCTV - CALCULATES ANSI TAPE VERSION

                                     0000     2 	.IDENT	"A0001"

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

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

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

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

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

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

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

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

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

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

                                     0000    18 ; CORPORATION.

                                     0000    19 ;

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

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

                                     0000    22 

                                     0000    23 ;++

                                     0000    24 ;

                                     0000    25 ; FACILITY:	MAGNETIC TAPE ACP  

                                     0000    26 ;

                                     0000    27 ; ABSTRACT:

                                     0000    28 ;

                                     0000    29 ;	THIS ROUTINE CALCULATES THE GENERATION AND GENERATION VERSION FIELDS

                                     0000    30 ;	OF THE ANSI MAGNETIC TAPE FROM TE FILES-11 VERSION NUMBER

                                     0000    31 

                                     0000    32 ; ENVIRONMENT:

                                     0000    33 ;	STARLET OPERATING SYSTEM, INCLUDING PRIVILEGED SYSTEM SERVICES AND

                                     0000    34 ;	INTERNAL EXEC ROUTINES.

                                     0000    35 

                                     0000    36 ;

                                     0000    37 ; AUTHOR:  DEBORAH H. GILLESPIE,   CREATION DATE:  26-JUL-1977 09:30   

                                     0000    38 ;

                                     0000    39 ; MODIFIED BY:

                                     0000    40 ;

                                     0000    41 ;  , VERSION  ,

                                     0000    42 ; 01	- 

                                     0000    43 ;--

                                     0000    44 

                                     0000    45 ;

                                     0000    46 ; INCLUDE FILES:

                                     0000    47 ;

                                     0000    48 

                                     0000    49 ;

                                     0000    50 ; MACROS:

                                     0000    51 ;

                                     0000    52 

                                     0000    53 ;

                                     0000    54 ; EQUATED SYMBOLS:

                                     0000    55 ;

                                     0000    56 ; INPUT PARAMETERS

                           00000004  0000    57 	VERSION	= 4	;BINARY VERSION NUMBER

CALCTV          - CALCULATES ANSI TAPE VERSION                   21-AUG-1978 23:24:14   VAX-11 MACRO X0.3-11               Page   2

A0001                                                                                                                            (1)



                           00000008  0000    58 	GENADDR	= 8	;ADDRESS OF QUAD WORD TO RECEIVE GENERATION AND GENERATION NUMBER

                                     0000    59 

                                     0000    60 ;

                                     0000    61 ; OWN STORAGE:

                                     0000    62 ;

CALCTV          - CALCULATES ANSI TAPE VERSION                   21-AUG-1978 23:24:14   VAX-11 MACRO X0.3-11               Page   3

A0001                                                                                                                            (2)



                                     0000    64 ;++

                                     0000    65 ;

                                     0000    66 ; FUNCTIONAL DESCRIPTION:

                                     0000    67 ;

                                     0000    68 ;	THIS ROUTINE CALCULATES THE GENERATION AND GENERATION VERSION

                                     0000    69 ;	FIELDS IN THE ANSI MAGNETIC TAPE FROM THE FILES-11 VERSION NUMBER

                                     0000    70 ;

                                     0000    71 ; CALLING SEQUENCE:

                                     0000    72 ;	CALC_TAPE_VER(ARG1,ARG2)

                                     0000    73 ;

                                     0000    74 ; INPUT PARAMETERS:

                                     0000    75 ;	ARG1 - BINARY VERSION NUMBER

                                     0000    76 ;	ARG2 - ADDRESS OF QUAD WORD TO RECEIVE GENERATION AND GENERATION NUMBER

                                     0000    77 ;

                                     0000    78 ; IMPLICIT INPUTS:

                                     0000    79 ;	NONE

                                     0000    80 ;

                                     0000    81 ; OUTPUT PARAMETERS:

                                     0000    82 ;	ARG2 - ADDRESS TO RECEIVE 

                                     0000    83 ;	       4 BYTES GENERATION NUMBER

                                     0000    84 ;	       4 BYTES GENERATION VERSION NUMBER

                                     0000    85 ;

                                     0000    86 ; IMPLICIT OUTPUTS:

                                     0000    87 ;	NONE

                                     0000    88 ;

                                     0000    89 ; ROUTINE VALUE:

                                     0000    90 ;	NONE

                                     0000    91 ;

                                     0000    92 ; SIDE EFFECTS:

                                     0000    93 ;	GENERATION NUMBER = (VERSION -1) /100

                                     0000    94 ;	GENERATION VERSION NUMBER = MOD (VERSION -1)/100

                                     0000    95 ;

                                     0000    96 ;--

                                     0000    97 

                                 00000000    98 	.PSECT	$CODE$,NOWRT,LONG

                                     0000    99 

                                     0000   100 CALC_TAPE_VER::

                               0004  0000   101 	.WORD	^M<R2>			;SAVE REGISTER R2

                                     0002   102 	

                                     0002   103 ; CLEAR ANSWER AND RETURN IF VERSION IS ZERO

            52         08 AC     D0  0002   104 	MOVL	GENADDR(AP),R2		;GET ADDRESS OF ANSWER

                          62     7C  0006   105 	CLRQ	(R2)			;CLEAR ANSWER

                       04 AC     D7  0008   106 	DECL	VERSION(AP)		;DECREMENT VERSION

            50         04 AC     3C  000B   107 	MOVZWL	VERSION(AP),R0		;PICKUP 16 BITS OF VERSION

                          51     D4  000F   108 	CLRL	R1			;EDIV TAKES QUAD WORD

            50   00000064 8F     7B  0011   109 	EDIV	#100,R0,(R2),4(R2)	;CALC QUOTIENT AND REMAINDER

         04 A2            62         0018       

                          62     D6  001B   110 	INCL	(R2)			;INCREMENT QUOTIENT

                                 04  001D   111 	RET				;RETURN

                                     001E   112 

                                     001E   113 	.END

CALCTV          - CALCULATES ANSI TAPE VERSION                   21-AUG-1978 23:24:14   VAX-11 MACRO X0.3-11               Page   4

SYMBOL TABLE                                                                                                                     (2)



AQB_TYPE       = 00000005            

CALC_TAPE_VER    00000000 RG    02   

FCB_TYPE       = 00000000            

GENADDR        = 00000008            

MVL_TYPE       = 00000004            

RVT_TYPE       = 00000003            

VCB_TYPE       = 00000002            

VERSION        = 00000004            

WCB_TYPE       = 00000001            





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  

$CODE$           0000001E      02     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

26920. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:CALCTV,LIS$:CALCTV/-SP=EXECML$/ML,SRC$:MTADEF,CALCTV

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 2 INTER. FILE WRITES. 

