Google
 

Trailing-Edge - PDP-10 Archives - bb-y390n-bm_tops20_v41_atpch_19 - autopatch/versio.mac
There are 88 other files named versio.mac in the archive. Click here to see a list.
	TITLE VERSIO - MONITOR VERSION NUMBER AND NAME MODULE
	SEARCH PROLOG

	VEDIT==^D8839
	VMAJOR==4
	VMINOR==1

IFNDEF VWHO,<VWHO==0>
SCVN==<VWHO>B2+<VMAJOR>B11+<VMINOR>B17+VEDIT

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1982,1983,1984
; BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;THE FOLLOWING MACRO GENERATES THE STRING:
;
;DEFINE SETVER(FOO)
;<FOO(WX(Y)-Z)
;>
;
;THE W,X,Y,Z ARE CALCULATED BY THE MACRO LIKE THIS:

;W - THE NUMBERICAL VALUE OF VMAJOR
;
;X - THE LETTER CORRESPONDING TO THE VALUE OF VMINOR.  @=0, A=1...
;
;Y - THE NUMERICAL VALUE OF VEDIT
;
;Z - THE NUMERICAL VALUE OF VWHO

	DEFINE	.CLNAM<
	  DEFINE  .CLNM(LETTER,WHO)<
	    IRPC LETTER,<
	      IFE "1"-"'LETTER'"+VMINOR-1,<
		STOPI
		IFIDN <LETTER><@>,<
		  IFE VWHO,< .NAME(\VMAJOR,,\VEDIT,)>
		  IFN VWHO,< .NAME(\VMAJOR,,\VEDIT,-WHO)>>
		IFDIF <LETTER><@>,<
		  IFE VWHO,< .NAME(\VMAJOR,LETTER,\VEDIT,)>
		  IFN VWHO,< .NAME(\VMAJOR,LETTER,\VEDIT,-WHO)>>>>>
	IFGE VMINOR-^D26,< VMINOR==0
	  PRINTX %MINOR VERSION TOO LARGE - IGNORED>
	IFGE VWHO-7,< VMINOR==
	  PRINTX %VWHO IS TOO LARGE - IGNORED>
	.CLNM(1234567,\VWHO)
>
;NOW DEFINE A .NAME MACRO TO MAKE A MACRO

	DEFINE	.NAME(V,M,E,W)<
DEFINE SETVER(FOO)
<FOO(<V'.'M'('E')'W>)
>>

;USE  IT!

.CLNAM

;MACRO TO BUILD VERSION TEXT FROM PARAMETERS IN VERSIO.MAC

   IFNDEF SETV1,<
DEFINE SETV1 (VTXT)<
   DEFINE SYSTXT (FOO)<
	FOO <TOPS-20 System, TOPS-20 Monitor VTXT>>>>

	.PSECT NRCOD		;INCLUDE WITH SWAPPABLE CODE


;SYSTEM VERSION TEXT AND DATE OF LOAD

SETVER (SETV1)			;GET SYSTXT DEFINED
DEFINE SETV2 (VTXT) <
   DEFINE SYSTXT (FOO)<
      FOO <, TOPS-20 Monitor VTXT>>>	;MACRO TO AID IN GENERATION OF VERSION #
				; PORTION OF MONITOR NAME ONLY


DEFINE FOO (A)<
	ASCIZ @A@>

TSVN::	SYSTXT (FOO)
	0			;ROOM FOR PATCHES
TSVNT==:.-TSVN

SVNM=:SCVN			;DEFINE COMPOSIT VERSION NUMBER

	SETVER (SETV2)		;REDEFINE SYSTXT
VTSVN::	SYSTXT (FOO)		;GENERATE STRING OF JUST THE VERSION
VTSVNT==:.-VTSVN		;NO. OF WORDS IN STRING

DEFINE BSETSPD (R)<
	IFE VMINOR,<
	ASCIZ/SYSTEM:'R'-SETSPD.EXE/>
	IFG VMINOR,<
	 DEFINE BSP (R1,LETT)<
		IRPC LETT,<
			IFE VMINOR+"1"-1-"'LETT'",<
			ASCIZ /SYSTEM:'R1'-'LETT'-SETSPD.EXE/
			STOPI>
			>
		>
	BSP(\VMAJOR,"1234567")>
	>

SETSPD::BSETSPD (\VMAJOR)

	.ENDPS NRCOD
	LOC 137			;PUT IN STANDARD PLACE
	SCVN

	END