Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!violet.berkeley.edu!swillett
From: swillett@violet.berkeley.edu
Newsgroups: comp.sys.ibm.pc
Subject: Re: Turbo Pascal 3.0 Question (Get Date function)
Message-ID: <11757@agate.BERKELEY.EDU>
Date: 7 Jul 88 15:13:57 GMT
References: <10770@cisunx.UUCP>
Sender: usenet@agate.BERKELEY.EDU
Distribution: na
Organization: University of California, Berkeley
Lines: 9

DOS function 2AH (42 decimal) returns the system date.  This is
accessed through interrupt 21H (33 decimal) which Turbo Pascal
gives you access to.  Set up the registers with 2AH in the AH
register and execute interrupt 21H.  You will get back:

          Register     Contents
             AL        Day of the week (0=SUN, 6=SAT)
             CX        Year (1980-2099)
             DH        Month (1-12)
             DL        Day (1-31)