Dec 172017
Simple little program that will tell you the time since last boot.
File UPTIME.ZIP from The Programmer’s Corner in
Category Batch Files
Simple little program that will tell you the time since last boot.
File Name File Size Zip Size Zip Type
UPTIME.COM 710 578 deflated
UPTIME.DOC 3166 1474 deflated

Download File UPTIME.ZIP Here

Contents of the UPTIME.DOC file

Uptime - A System running timer by Kevin Withnall
[email protected]
Kevin Withnall 3:712/206.0 Fidonet

This program was written because when trying to modify a cache, its handy to
know that the stats the cache gives you are valid. ie if the cache has stopped
79% of transfers but the machine has only been up for 5 minutes, ten its
probably not a good number to look at. however, if the machine was up for 2
days, then its reaonable to use the percentage in attempting to modify the
cache configuration to improve it.

The way this works is it stays in memory after the first time it is run. ( a
TSR ) This will from then on, whenever its called, give you a indication of how
long sonce the program was first run. If you load this in the autoexec.bat file
it will give you a fairly good estimate of how long the machine has been up.

The output of the program uses dos functions 09h to pring the strings so
therefore the output it totally re-directable. The program was written totally
in assembler to make it as small and fast as possible.

It works by looking at the clock about twice a second ( evey 10 times int 1Ch
is called ) and if the seconds have changed, it will make a note of it and
increase the number of secods. if this gets to 60, it will increase the minutes
and reset the seconds etc. It uses a word for each number ( 16 bits ) even
though its not necessary, its easy. The only limit on this, is when the days
get to 65536 and then it will wrap around. Thats about 179 years so i dont
think its a problem.

Programmers can use this by calling interrupt 7Fh ( first make sure its not
pointing at 0000:0000 in the interrupt table by using dos's function 35h )
Then, once youre happy that int 7fh is pointing to a iret or another program,
then call it with ah = 07h ( this programs number ) and al = 05h ( function to
ask for signature ) After this call, ax should be 0067h to say that the program
is there.
Make sure that when you call it, ah is 07h as that is this programs number.
every tsr i write uses int 7fh and has its own number. if you dont make ah =
07h it will ignore you and jump to the next thing in the chain.

some of the other functions available are...
al = 00hThis will cause normal operation. ie if its the 10th time to be
called like this, check the clock etc. this is called from the
int 1C handler and you probably wont need to use this.
al = 01hThis gets you the address of the int 7Fh handler, ive never
needed to use this but i thought it may be handy.
it returns it in ax:bx
al = 02hThis will get the operation status of the program. ie al = 0 (
program is disabled ) or al = 1 ( program is enabled )
al = 03hThis enables the timer
al = 04hThis disables the timer
al = 05hThis give a number 0067h in ax to say that the program is
installed and working.
al = 06hget the time since installation
This returns
any other al value will cause the carry flag to be set.

If you like this program, please send mail to me at ano of the above addresses.
Id like to hear if anyone is using this.

 December 17, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>