home *** CD-ROM | disk | FTP | other *** search
- ;
- ; subroutine date: assembly language routine to allow the acquisition
- ; of the current date
- ;
- ; fortran call is : call date(month,day,year)
- ;
- ; where: month = munber of month(1-12), day = number of day(1-31)
- ; year = current year(1980-2099)
- ;
- ; interface to ms-fortran 3.2
-
- frame struc
- savebp dw ?
- saveret dd ?
- year dd ?
- day dd ?
- month dd ?
- frame ends
-
- ;
- code segment 'code'
- assume cs:code
- date proc far
- public date
- push bp
- mov bp,sp
- mov ah,2ah
- int 21h
- les bx,[bp]+year ; point to year
- mov es:[bx],cx ; cx = year in binary
- mov al,dh ; get month to al
- cbw ; zero extend
- les bx,[bp]+month
- mov es:[bx],ax
- mov al,dl ; get day to al, ah=0
- les bx,[bp]+day
- mov es:[bx],ax ; store day
-
- pop bp
- ret 12
- date endp
- code ends
- end