#include <windows.h>


void DosTime(yearP, monthP, dayP, hoursP, minutesP, secondsP, hundsP)
	    short *yearP;
	    char *monthP, *dayP, *hoursP, *minutesP, *secondsP, *hundsP;

{

    _asm
    {
        mov     ah,2ah
        int     21h
	mov	eax, yearP
	mov	[eax],cx
	mov	eax, monthP
        mov     [eax],dh
	mov	eax, dayP
        mov     [eax],dl

        mov     ah,2ch
        int     21h
	mov	eax, hoursP
	mov	[eax],ch
	mov	eax, minutesP
        mov     [eax],cl
	mov	eax, secondsP
        mov     [eax],dh
	mov	eax, hundsP
        mov     [eax],dl
    }
}

void NtTime(yearP, monthP, dayP, hoursP, minutesP, secondsP, milliP)
	    short *yearP, *monthP, *dayP, *hoursP, *minutesP,
                  *secondsP, *milliP;

{
    SYSTEMTIME sys_time;

    GetLocalTime(&sys_time);

    *yearP = sys_time.wYear;
    *monthP = sys_time.wMonth;
    *dayP = sys_time.wDay;
    *hoursP = sys_time.wHour;
    *minutesP = sys_time.wMinute;
    *secondsP = sys_time.wSecond;
    *milliP = sys_time.wMilliseconds;
    return;
}
