	title SDATE - GET SYSTEM DATE
DATA	SEGMENT PUBLIC 'DATA'
DATA	ENDS
DGROUP	GROUP DATA
CODE	SEGMENT 'CODE'
	ASSUME CS:CODE,DS:DGROUP,SS:DGROUP
PUBLIC SDATE
SDATE PROC FAR
	PUSH BP	;PUSH FRAME POINTER
	MOV	BP,SP
	LES	BX,DWORD PTR [BP+14] ;ES:BX IS ADDR OF 1ST ARG
; CALL SDATE(YY,MM,DD) RETURNS ALL 3
	MOV	AH,2AH	;DO DOS GET-DATE
	INT	21H	;CALL DOS
;CX=YEAR
;DH=MONTH
;DL IS DAY
	MOV	ES:[BX],CX ;COPY YEAR
	LES	BX,DWORD PTR [BP+10]
	MOV	ES:[BX],DH	;COPY MONTH
	LES	BX,DWORD PTR [BP+6]
	MOV	ES:[BX],DL ;COPY DAY
;
	MOV	SP,BP
	POP	BP	;RESTORE FRAME POINTER
	RET	0CH	;RETURN, POP 8 BYTES
SDATE	ENDP
CODE	ENDS
END

