Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBTOC.ZIP
Filename : SYSDATE.ASM

 
Output of file : SYSDATE.ASM contained in archive : DBTOC.ZIP
;------------------------------------------------------------------
; Function: SYSDATE()
;
; Description: Returns the system date in packed format:
;
; 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
; -------------------- ---------- -------------
; year month day
;
; Syntax: todaysdate = sysdate();
; unsigned int todaysdate;
;
;------------------------------------------------------------------

INCLUDE PROGSEG.H

PUBLIC sysdate
sysdate PROC NEAR

mov ah,02ah
int 21h ; call dos to get the system date
mov ax,cx
sub ax,1980 ; get rid of DOS format year bias
mov cl,4
shl ax,cl ; room for month
add al,dh
mov cl,5 ; shift count to make room for the day
shl ax,cl
add al,dl ; drop in the day

ret

sysdate ENDP
INCLUDE ENDPSEG.H
END sysdate






  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBTOC.ZIP
Filename : SYSDATE.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/