Page 1 of 2
MS-DOS 1.00 Date information retrieval
Posted: Sun May 27, 2012 7:17 pm
by VolTeK
Im not too sure how MS-DOS 1.00 got the time from the system, going through Ctyme's interrupt list for 0x1A i see a way to get the date, but its for machines above IBM 5150 (XT286 for example). Does anyone know how DOS got the system time?
I want to be able to get the date, but not have to have requirements for machines above the IBM 5150. Any specs/examples/links to information on this?
Re: MS-DOS 1.00 Date information retrieval
Posted: Sun May 27, 2012 7:29 pm
by Brendan
Hi,
VolTeK wrote:Im not too sure how MS-DOS 1.00 got the time from the system, going through Ctyme's interrupt list for 0x1A i see a way to get the date, but its for machines above IBM 5150 (XT286 for example). Does anyone know how DOS got the system time?
On extremely old computers (that had no RTC or "get time/date" BIOS functions), DOS asked the user during boot.
Cheers,
Brendan
Re: MS-DOS 1.00 Date information retrieval
Posted: Sun May 27, 2012 8:34 pm
by VolTeK
Brendan wrote:On extremely old computers (that had no RTC or "get time/date" BIOS functions), DOS asked the user during boot.
Thank you, the only type of info i can get is the time, as for the date i had figured the same.
Re: MS-DOS 1.00 Date information retrieval
Posted: Tue May 29, 2012 6:01 am
by qw
Iirc, all versions of DOS up to 7 prompted the user for the time and date if AUTOEXEC.BAT was not present.
Re: MS-DOS 1.00 Date information retrieval
Posted: Tue May 29, 2012 1:07 pm
by VolTeK
Hobbes wrote:Iirc, all versions of DOS up to 7 prompted the user for the time and date if AUTOEXEC.BAT was not present.
A fun fact i suppose?....
Re: MS-DOS 1.00 Date information retrieval
Posted: Tue May 29, 2012 3:00 pm
by Casm
VolTeK wrote:Im not too sure how MS-DOS 1.00 got the time from the system, going through Ctyme's interrupt list for 0x1A i see a way to get the date, but its for machines above IBM 5150 (XT286 for example). Does anyone know how DOS got the system time?
I want to be able to get the date, but not have to have requirements for machines above the IBM 5150. Any specs/examples/links to information on this?
It's a good job I have a long memory. Try int 21h, function ah = 2ch
Interrupt 8 maintained a dword count at 40:6ch (18.2 ticks per second, starting at midnight).
Re: MS-DOS 1.00 Date information retrieval
Posted: Tue May 29, 2012 3:23 pm
by VolTeK
Casm wrote:It's a good job I have a long memory. Try int 21h, function ah = 2ch
Its alright, i've already written my version of IO.SYS now, moving on into MSDOS.SYS.
I will also state im rewriting my own version of MS-DOS not running it on top of. It then would just be an application.
Not looking for the time either. The System provides it -.-
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 3:54 am
by qw
VolTeK wrote:A fun fact i suppose?....
Indeed, and an answer to your question.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 9:20 am
by bubach
I'm not so sure about that. What possible connection does autoexec.bat has with time & date? Only thing I can think of was on very old computers without battery powered clock where it could contain the "TIME" and "DATE" commands to ask the user at each boot, but that was _with_ an autoexec.bat - not without one.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 10:01 am
by iansjack
As I remember it the default for a 5150 running MS-DOS 1 was to prompt for time and date. This was the default because it didn't have an RTC. But if you added an RTC on an add-in card then you would put a command in autoexec.bat to set the time and date from the card and not prompt for them. Early versions of DOS insisted on a valid date; in later versions you could just press <Enter> and get the default 01-01-1970.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 10:59 am
by Love4Boobies
Casm wrote:VolTeK wrote:Im not too sure how MS-DOS 1.00 got the time from the system, going through Ctyme's interrupt list for 0x1A i see a way to get the date, but its for machines above IBM 5150 (XT286 for example). Does anyone know how DOS got the system time?
I want to be able to get the date, but not have to have requirements for machines above the IBM 5150. Any specs/examples/links to information on this?
It's a good job I have a long memory. Try int 21h, function ah = 2ch
Interrupt 8 maintained a dword count at 40:6ch (18.2 ticks per second, starting at midnight).
It's a bad job you can't read, though. The question was how DOS got the time, not how the programmer could get it from DOS.
Hobbes wrote:Iirc, all versions of DOS up to 7 prompted the user for the time and date if AUTOEXEC.BAT was not present.
Nope.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 12:26 pm
by qw
Perhaps it was CONFIG.SYS, I am not sure.
What possible connection AUTOEXEC.BAT (or CONFIG.SYS) could have with time and date I don't know. You should ask Microsoft.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 2:06 pm
by VolTeK
Hobbes wrote:Indeed, and an answer to your question.
I ask how MS-DOS Gets the date (the current time is) and then asks for input, not when it does or doesn't if or if not AUTOEXEC.BAT is present on the disk.
Hobbes wrote:Perhaps it was CONFIG.SYS, I am not sure.
What possible connection AUTOEXEC.BAT (or CONFIG.SYS) could have with time and date I don't know. You should ask Microsoft.
You are correct about your statement however, adding an (even empty) AUTOEXEC.BAT to (what i have to be MS-DOS 3.3) it skips asking the time and date.
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 6:20 pm
by bubach
VolTeK wrote:You are correct about your statement however, adding an (even empty) AUTOEXEC.BAT to (what i have to be MS-DOS 3.3) it skips asking the time and date.
Yeah, thats because what I said about the time and date commands in autoexec.bat was true. He said it the other way around, that an empty or non-existent autoexec.bat WOULD make it ask....
Re: MS-DOS 1.00 Date information retrieval
Posted: Thu May 31, 2012 7:31 pm
by VolTeK
bubach wrote:Yeah, thats because what I said about the time and date commands in autoexec.bat was true. He said it the other way around, that an empty or non-existent autoexec.bat WOULD make it ask....
That's cool, but whether it asks or not has nothing to do with my original question. I ask
how it gets the date, not,
when should it ask for the time or date.
Don't skip ahead and read the title, who knows, you may have to read one more line of words to recognize what the question is.