Category : C Source Code
Archive   : BSRC_140.ZIP
Filename : DOSTIME.ASM
page 64,132
title DosTime
subttl by Wynn Wagner III
name DosDate
;
;
;
; The following macro files come with the MicroSoft "C" compiler
;
include version.inc
include msdos.inc
include cmacros.inc
.sall
.list
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sBegin code
assumes cs,code
assumes ds,data
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; --------------------------------------------------------------------
; void dostime(&hour,&min,&sec,&ths);
;
; int hour; 0-23 military time
; int min; 0-59
; int sec; 0-59
; int ths; 0-99
; --------------------------------------------------------------------
cProc dostime,
parmW Hour
parmW Minutes
parmW Seconds
parmW Thousandths
cBegin
callos gettime
mov al, ch
xor ah, ah
mov di, Hour ; Address of Hour
mov [di],ax
mov bl, cl
xor bh, bh
mov di, Minutes ; Address of Minutes
mov [di],bx
mov cl, dh
xor ch, ch
mov di, Seconds ; Address of Seconds
mov [di],cx
xor dh, dh
mov di, Thousandths ; Address of Thousandths
mov [di],dx
cEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; --------------------------------------------------------------------
; void dosdate(&month,&mday,&year,&wday);
;
; int month; 1-12
; int mday; 1-31 day of month
; int year; 1980-2099
; int wday; 0-6 day of week (0=Sun,6=Sat)
; --------------------------------------------------------------------
cProc dosdate,
parmW Month
parmW Mday
parmW Year
parmW Wday
cBegin
callos getdate
mov bl, dh
xor bh, bh
mov di, Month ; Address of Month
mov [di],bx
xor dh, dh
mov di, Mday ; Address of Day-of-Month
mov [di],dx
mov di, Year ; Address of Year
mov [di],cx
xor ah, ah
mov di, Wday ; Address of Day-of-Week
mov [di],ax
cEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sEnd
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/