Google
 

Trailing-Edge - PDP-10 Archives - steco_19840320_1er_E35 - 10,5676/teco/macros/date.tco
There is 1 other file named date.tco in the archive. Click here to see a list.
!;DATE -- Returns date in Q-reg 0 in the form DD-Mmm-YY	!
	[1 [2 [3 [4 [5			!;Save registers!
	EOU5 3EO			!;Save and set EO level!
	.U4				!;Save pointer!
	^O56,^O11^GU1			!;Get year!
	^O57,^O11^GU2			!;Get month!
	^O60,^O11^GU3			!;Get day!
	ZJ .U0				!;Go to end of buffer, save pointer!
	IJanFebMarAprMayJunJulAugSepOctNovDec$	!;Insert month abbrevs.!
	Q0J Q2-1*3C .,.+3X2 Q0,ZK	!;Store proper abbr in Q2!
	Q3-10"L I0$'			!;Put in leading 0 if needed!
	Q3\ I-^G2-$ (Q1-1900)\		!;Insert rest of day, month, year!
	Q0J .,ZX0 .,ZK			!;Store string in Q0 and delete!
	Q4J Q5EO			!;Restore pointer, EO level!
	]5 ]4 ]3 ]2 ]1			!;Restore registers!