c INT.FOR  A sample program which uses the INT 21, function 2A
c  to get the system date.
c NOTE:
c THIS PROGRAM, ITS USE, OPERATION AND SUPPORT IS PROVIDED "AS
c IS," WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
c INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
c MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
c ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THIS PROGRAM
c IS WITH THE USER.  IN NO EVENT SHALL MICROSOFT BE LIABLE FOR ANY
c DAMAGES INCLUDING, WITHOUT LIMITATION, ANY LOST PROFITS, LOST
c SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
c FROM THE USE OR INABILITY TO USE SUCH PROGRAM, EVEN IF
c MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
c OR FOR ANY CLAIM BY ANY OTHER PARTY.                               
c

       INCLUDE 'interrpt.inc' 
       gethibyte (dataword) = dataword / 256   ! statement functions from
       getlobyte (dataword) = iand(dataword , 255)   ! include file

       inregs.ax=#2a00                    ! Function number 
       intnum=#21                         ! Interrupt number
       call interrupt(intnum,inregs,outregs)        ! Call MS-DOS interrupt

       write (*,*) 'Using INT 21, function 2A '
       write (*,*) '  Month= ', gethibyte(outregs.dx)  ! High byte is month
       write (*,*) '  Day  = ', getlobyte(outregs.dx)  ! Low byte is day
       write (*,*) '  Year = ', outregs.cx ! Year 

       end

