flat assembler
Message board for the users of flat assembler.

flat assembler > DOS > How to get the current time?

Author
Thread Post new topic Reply to topic
LiuJunfeng



Joined: 28 Nov 2003
Posts: 48
Location: China
I want to check how much time consumed of a program.
when code executing, how to get the current time?
Embarassed
Post 19 May 2004, 04:38
View user's profile Send private message Reply with quote
polygon7



Joined: 14 Aug 2003
Posts: 62
Location: Poznan, Poland
LiuJunfeng wrote:
I want to check how much time consumed of a program.
when code executing, how to get the current time?
Embarassed


Hi,
try to use 2Ch function of DOS (21h) interrupt:
Code:
mov ah, 2Ch
int 21h    

returns:
CH = Hours (0-23)
CL = Minutes (0-59)
DH = Seconds (0-59)
DL = MSeconds (0-99)

or function 02h of BIOS (1Ah) interrupt:
Code:
mov ah, 2h
int 1Ah    

returns:
if CF is set, then RTClock doesn't work
CH = Hours in BCD
CL = Minutes in BCD
DH = Seconds in BCD

P.S Sorry for my poor english.

_________________
best regards
p7
Post 19 May 2004, 11:07
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.