/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/ EDIT #11
/
/ COPYRIGHT 1970, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/ MCR FUNCTION: DATE         25 MAR 71          H. KREJCI
/
/ TASK NAME:  "...DAT"   TO TYPE  DATE & TIME ON THE
/ LUN-3 IN RESPONSE TO THE MCR "DATE" REQUEST.
/
/ THE FIRST LINE OF COMMAND INPUT FOR ANY MCR FUNCTION IS READ
/ BY THE RESIDENT MCR TASK ("...MCR").  FOR THE "DATE" FUNCTION,
/ THE SYNTAX OF THE FIRST LINE IS:
/
/	SYNTAX = "DAT"$<CHARACTER> <CR>/<AM>
/	    <CHARACTER> = <LETTER>/<DIGIT>
/	    <CR> = CAR RTN
/	    <AM> = ALTMODE
/	    $ "ANY NUMBER OF, INCLUDING ZERO"
/
/ THE RESIDENT MCR READS A LINE, FETCHES THE FIRST THREE CHARACTERS
/ TO FROM THE MCR FUNCTION TASK NAME ("...DAT"), FLUSHES CHARACTERS
/ THRU THE FIRST BREAK OR TERMINAL CHAR, REQUESTS "...DAT" AND EXITS.
/
/ LINE TERMINATOR.  NO DATA IS TAKEN FROM THE COMMAND INPUT LINE.
/ THE TASK "...DAT" FLUSHES ALL CHARACTERS THRU THE END OF THE INPUT LINE,
/ AND SAVES THE LINE TERMINATOR.  NO DATA IS TAKEN FROM THE INPUT LINE.
/
/ THE DATE AND TIME ARE TYPED OUT  "MM/DD/YY   HH:MM:SS"
/
/ IF THE INPUT LINE IS TERMINATED BY A CAR RTN, THE RESIDENT MCR
/ IS REQUESTED, AND THE FUNCTION TASK EXITS.
/
/ IF THE INPUT LINE IS TERMINATED BY AN ALTMODE, THE FUNCTION
/ TASK ("...DAT") EXITS WITHOUT REQUESTING THE RESIDENT MCR.
/ A ^C TYPEIN IS NECESSARY TO RE-ESTABLISH MCR DIALOGUE.
 .TITLE *** MCR FUNCTION 'DATE'
/
SS=163
MM=164
HH=165
MO=166
DA=167
YR=170
MCRRI=171
FAC=174
/
.INH=705522	/INHIBIT INTERRUPTS
.ENB=705521	/ENABLE INTERRUPTS
/
DATE	JMS*	(FAC)	/FLUSH INPUT THRU TERMINATOR, AND
	SAD	(015)
	JMP	DAT3
	SAD	(175)
	JMP	DAT3
	JMP	DATE
DAT3	DAC	TERM
/
	.INH		///FETCH DATE & TIME
	LAC*	(MO)	///
	DAC	MMO	///
	LAC*	(DA)	///
	DAC	MDA	///
	LAC*	(YR)	///
	DAC	MYR	///
	LAC*	(HH)	///
	DAC	MHH	///
	LAC*	(MM)	///
	DAC	MMM	///
	.ENB		///
	LAC*	(SS)	///
	DAC	MSS
/
	LAC	(MMO)	/CONVERT DATE & TIME TO DECIMAL AND
	DAC	CONX	/STORE IN IMAGE ALPHA BUFFER
	JMS	CON
	JMS	CON
	JMS	CON
	LAC	(MHH)
	DAC	CONX
	JMS	CON
	JMS	CON
	JMS	CON
/
	CAL	TYPE	/TYPE DATE & TIME
	CAL	WAIT	/WAIT FOR TTY TO FINISH
/
	LAC	TERM	/IF CAR RTN TERMINATED INPUT LINE, REQUEST
	SAD	(015)	/RESIDENT MCR TASK & EXIT.  IF ALTMODE TERMINATED
	CAL	REQMCR	/INPUT LINE, CLEAR ^C REQUEST INHIBIT FLAG
	SAD	(175)	/AND EXIT.
	DZM*	(MCRRI)
	CAL	(10)
/
TERM	0
/
REQMCR	1		/REQUEST "...MCR" CPB
	0
	.SIXBT	"..."
	.SIXBT	"MCR"
	0
/ CON -- SUBROUTINE TO CONVERT AN INTEGER TO ITS TWO DIGIT
/ DECIMAL EQUIVALENT (IMAGE ALPHA).  'CONX' POINTS TO THE
/ BINARY WORD.  THE BINARY WORD IS REPLACED BY THE TENS
/ DIGIT AND THE UNITS DIGIT IS STORED IN THE FOLLOWING WORD.
/ 'CONX' IS INCREMENTED BY THREE.
/
CON	0
	LAC*	CONX
	DZM*	CONX
CON1	DAC	CONB
	AAC	-12
	SPA
	JMP	CON2
	ISZ*	CONX
	JMP	CON1
CON2	LAC*	CONX
	XOR	(60)
	DAC*	CONX
	ISZ	CONX
	LAC	CONB
	XOR	(60)
	DAC*	CONX
	ISZ	CONX
	ISZ	CONX
	JMP*	CON
/
CONX	0
CONB	0
/
TYPE	2700	/FUNCTION
	TYPEV	/EV ADR
	3	/LUN
	3	/MODE
	MES12	/BUFFFER ADR
/
WAIT	20	/WAIT FOR REQUEST
	TYPEV	/EVENT VARIABLE
/
/
TYPEV	0	/EVENT VARIABLE
/
MES12	013003	/HEADER
	000000
MMO	000	/MONTH
	000
	057	/SLASH
MDA	000	/DAY
	000
	057	/SLASH
MYR	000	/YEAR
	000
	040	/SPACE
	040	/SPACE
MHH	000	/HOURS
	000
	072	/COLON
MMM	000	/MINUTES
	000
	072
MSS	000	/SECONDS
	000
	015	/CR
	012	/LF
/
	.END	DATE
