Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!eurtrx!euraiv1!reino From: reino@cs.eur.nl (Reino de Boer) Newsgroups: comp.lang.pascal Subject: Re: Time of Day Keywords: Help. Message-ID: <1989Dec15.074636.15850@cs.eur.nl> Date: 15 Dec 89 07:46:36 GMT References: <851@disk.UUCP> Organization: Erasmus Universiteit Rotterdam, dept. CS (Informatica) Lines: 35 specter@disk.UUCP (Byron Max Guernsey) writes: >I need some help. I am using TP v3 and I need to read from the time of day clock >to get the time/date. Does anyone have a procedure or can easily write one to >demonstrate it? Your manual contains an example of a type Registers = record ... declaration. Use this declaration for the following: procedure get_date( var tm_wday : byte; var tm_year : integer; tm_month, tm_day : byte ); { tm_wday = day of week ( 0 = Sunday, 1 = Monday, and so on tm_year = 1980 through 2099 } var cpu : registers; begin cpu.ah := $2A; msdos( cpu ); with cpu do begin tm_wday := al; tm_year := cx; tm_month := dh; tm_day := dl end end; A similar procedure can be written to get the time of day (function $2C, where returned registers contain: ch = hours, cl = minutes, dh = seconds, and dl = hundreds of second. Hope this helps -- Reino -- Reino R. A. de Boer Erasmus University Rotterdam ( Informatica ) e-mail: reino@cs.eur.nl