<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.signature.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=Get_DOS_Time</id>
		<title>Get DOS Time - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=Get_DOS_Time"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=Get_DOS_Time&amp;action=history"/>
		<updated>2026-05-13T00:22:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.signature.net/index.php?title=Get_DOS_Time&amp;diff=1544&amp;oldid=prev</id>
		<title>Badge at 11:23, 13 June 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=Get_DOS_Time&amp;diff=1544&amp;oldid=prev"/>
				<updated>2009-06-13T11:23:34Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:23, 13 June 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Return:'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Return:'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 2 of the CX register (i.e., the CH byte) contains the hour&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 2 of the CX register (i.e., the CH byte) contains the hour (0 to 23; in hex).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &lt;/del&gt;(0 to 23; in hex).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 1 of the CX register (i.e., the CL byte) contains the minute (0 to 59; in hex).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 1 of the CX register (i.e., the CL byte) contains the minute&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &lt;/del&gt;(0 to 59; in hex).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 2 of the DX register (i.e., the DH byte) contains the second (0 to 59; in hex).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 2 of the DX register (i.e., the DH byte) contains the second&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 1 of the DX register (i.e., the DL byte) contains the hundredths of seconds (0 to 99; in hex).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &lt;/del&gt;(0 to 59; in hex).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; Byte 1 of the DX register (i.e., the DL byte) contains the&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &lt;/del&gt;hundredths of seconds (0 to 99; in hex).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:1543:newid:1544 --&gt;
&lt;/table&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=Get_DOS_Time&amp;diff=1543&amp;oldid=prev</id>
		<title>Badge: New page: '''Get DOS Time'''  '''Syntax:'''   DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label   '''Entry:'''   AX-value = &quot;@2C00@&quot;   BX-value = &quot;@0000@&quot;   CX-value = &quot;@0000@&quot;   DX-va...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=Get_DOS_Time&amp;diff=1543&amp;oldid=prev"/>
				<updated>2009-06-13T11:21:13Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;Get DOS Time&amp;#39;&amp;#39;&amp;#39;  &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;   DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label   &amp;#39;&amp;#39;&amp;#39;Entry:&amp;#39;&amp;#39;&amp;#39;   AX-value = &amp;quot;@2C00@&amp;quot;   BX-value = &amp;quot;@0000@&amp;quot;   CX-value = &amp;quot;@0000@&amp;quot;   DX-va...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Get DOS Time'''&lt;br /&gt;
&lt;br /&gt;
'''Syntax:'''&lt;br /&gt;
  DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label  &lt;br /&gt;
'''Entry:'''&lt;br /&gt;
  AX-value = &amp;quot;@2C00@&amp;quot;&lt;br /&gt;
  BX-value = &amp;quot;@0000@&amp;quot;&lt;br /&gt;
  CX-value = &amp;quot;@0000@&amp;quot;&lt;br /&gt;
  DX-value = &amp;quot;@0000@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Return:'''&lt;br /&gt;
  Byte 2 of the CX register (i.e., the CH byte) contains the hour&lt;br /&gt;
  (0 to 23; in hex).&lt;br /&gt;
&lt;br /&gt;
  Byte 1 of the CX register (i.e., the CL byte) contains the minute&lt;br /&gt;
  (0 to 59; in hex).&lt;br /&gt;
&lt;br /&gt;
  Byte 2 of the DX register (i.e., the DH byte) contains the second&lt;br /&gt;
  (0 to 59; in hex).&lt;br /&gt;
&lt;br /&gt;
  Byte 1 of the DX register (i.e., the DL byte) contains the&lt;br /&gt;
  hundredths of seconds (0 to 99; in hex).&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Discussion:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The DOSMS function call can be used to get the DOS system time. This function requires that the AX-value be set to &amp;quot;@2C00@&amp;quot;, and that the other entry values be set to null.&amp;lt;br&amp;gt; &lt;br /&gt;
After the function is executed, the DOS time is returned in the registers as described above. Note that the values are returned in hex and must be converted to decimal for meaningful use. &lt;br /&gt;
 &lt;br /&gt;
'''Example:'''&lt;br /&gt;
  ! S STIME,DSK&lt;br /&gt;
  ! O TIME,DSK&lt;br /&gt;
  ! L T00,E&lt;br /&gt;
  ! R QMONITOR&lt;br /&gt;
  !&lt;br /&gt;
  !==========  GET DOS TIME =======================================&lt;br /&gt;
  !&lt;br /&gt;
  LENGTH 2 &amp;amp; LOCAL AX$,BX$,CX$,DX$        ! Define registers&lt;br /&gt;
             LOCAL HOUR$,MIN$,SEC$,HUND$  ! Define time variables&lt;br /&gt;
  LENGTH 1 &amp;amp; LOCAL CH$,CL$,DH$,DL$        ! Define sub-registers&lt;br /&gt;
  LENGTH 2.0 &amp;amp; LOCAL HOUR,MIN,SEC,HUND    ! Define numeric times&lt;br /&gt;
  !&lt;br /&gt;
  100 FORMAT (ET)                         ! Screen format&lt;br /&gt;
  !&lt;br /&gt;
  CLEAR                        ! Initialize all variables&lt;br /&gt;
  !&lt;br /&gt;
  AX$=&amp;quot;@2C00@&amp;quot;                 ! Set AX register for &amp;quot;GET TIME&amp;quot;&lt;br /&gt;
  BX$=&amp;quot;@0000@&amp;quot;                 ! Set BX register to null&lt;br /&gt;
  CX$=&amp;quot;@0000@&amp;quot;                 ! Set CX register to null&lt;br /&gt;
  DX$=&amp;quot;@0000@&amp;quot;                 ! Set DX register to null&lt;br /&gt;
  !&lt;br /&gt;
  DOSMS(AX$,BX$,CX$,DX$)       ! Perform DOSMS system call&lt;br /&gt;
  !&lt;br /&gt;
  HOUR$ = SUB(CX$,2,1)         ! Hour (hex) = CH byte of CX&lt;br /&gt;
  MIN$  = SUB(CX$,1,1)         ! Minute (hex) = CL byte of CX&lt;br /&gt;
  SEC$  = SUB(DX$,2,1)         ! Second (HEX) = DH byte of DX&lt;br /&gt;
  HUND$ = SUB(DX$,1,1)         ! Hundredths (hex) = DL byte of DX&lt;br /&gt;
  !&lt;br /&gt;
  HOUR$ = &amp;quot;@00@&amp;quot; + HOUR$       ! Addleading null byte to HOUR$&lt;br /&gt;
  MIN$  = &amp;quot;@00@&amp;quot; + MIN$        ! Add leading null byte to MIN$&lt;br /&gt;
  SEC$  = &amp;quot;@00@&amp;quot; + SEC$        ! Add leading null byte to SEC$&lt;br /&gt;
  HUND$ = &amp;quot;@00@&amp;quot; + HUND$       ! Add leading null byte to HUND$&lt;br /&gt;
  !&lt;br /&gt;
  HOUR = HEXDEC(HOUR$)         ! Convert hex HOUR$ to decimal HOUR&lt;br /&gt;
  MIN  = HEXDEC(MIN$)          ! Convert hex MIN$ to decimal MIN&lt;br /&gt;
  SEC  = HEXDEC(SEC$)          ! Convert hex SEC$ to decimal SEC&lt;br /&gt;
  HUND = HEXDEC(HUND$)         ! Convert hex HUND$ to decimal HUND$&lt;br /&gt;
  !&lt;br /&gt;
  PRINT (0,100)                ! Set typewriter mode&lt;br /&gt;
  !&lt;br /&gt;
  PRINT (0) &amp;quot;HOUR:      &amp;quot;;HOUR&lt;br /&gt;
  PRINT (0) &amp;quot;MINUTE:    &amp;quot;;MIN&lt;br /&gt;
  PRINT (0) &amp;quot;SECONDS:   &amp;quot;;SEC&lt;br /&gt;
  PRINT (0) &amp;quot;HUNDREDTHS:&amp;quot;;HUND&lt;br /&gt;
  INPUT (0) &amp;quot;&amp;quot;&lt;br /&gt;
  RUN &amp;quot;QMONITOR&amp;quot;&lt;br /&gt;
  END&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>