Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/newver.bli
There are no other files named newver.bli in the archive.
MODULE NEWVER(STACK,LOWSEG)=
BEGIN

EXTERNAL
	OPENOUT,CLOSEOUT,ENTER,OUTMSG,WRITE;

GLOBAL OBUFH[3],DAY,MONTH,YEAR;

BIND LBLOCK=PLIT(SIXBIT 'VERSIO',SIXBIT 'REL',0,0);

MACHOP CALLI=#47;

MACRO RESET=CALLI(0,0)$, STOP=CALLI(1,#12)$;


BIND DATA=PLIT(#4^18,0,#6000001,0,RADIX50 '.VER',#1000002,0,#137,0,#5000002,2^33,0,#140);
BIND ACCUM=PLIT(0,31,59,90,120,151,181,212,243,273,304,334);

REGISTER R;

RESET;
CALLI(R,#14);
DAY_.R MOD 31 + 1;
MONTH_(.R/31) MOD 12 + 1;
YEAR_((.R/31)/12)+64;
DAY_.ACCUM[.MONTH-1]+.DAY;
IF (.YEAR MOD 4) EQL 0 THEN IF .MONTH GTR 2 THEN DAY_.DAY+1;
DATA[8]_.YEAR*1000+.DAY;
IF NOT OPENOUT(#10,SIXBIT 'DSK',OBUFH^18) THEN (OUTMSG(PLIT ASCIZ 'CAN NOT OPEN');STOP);
ENTER(LBLOCK<0,0>);

INCR I FROM 0 TO .DATA[-1]-1 DO IF NOT WRITE(.DATA[.I]) THEN (OUTMSG(PLIT ASCIZ 'I/O ERROR');STOP);
CLOSEOUT();
END;