Subversion Repositories Kolibri OS

Rev

Rev 9537 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5640 pavelyakov 1
//IO library
2
#ifndef INCLUDE_DATE_H
3
#define INCLUDE_DATE_H
4
 
5
#ifndef INCLUDE_STRING_H
6
#include "../lib/strings.h"
7
#endif
8
 
9
:struct date
10
{
11
	byte day;
12
	byte month;
13
	word year;
14
};
15
 
9636 leency 16
:struct time
7806 leency 17
{
9636 leency 18
	byte seconds;
19
	byte minutes;
20
	byte hours;
21
	byte rez;
22
};
23
 
24
:void DrawDateTime(dword x, y, color, _date, _time)
25
{
26
	EDI = _date;
7806 leency 27
	EAX = 47;
28
	EBX = 2<<16;
29
	EDX = x<<16+y;
30
	ESI = 0x90<<24+color;
31
	ECX = EDI.date.day;
9537 leency 32
	$int 64
9636 leency 33
	EDX += 24<<16;
7806 leency 34
	ECX = EDI.date.month;
9537 leency 35
	$int 64
9636 leency 36
	EDX += 24<<16;
7806 leency 37
	EBX = 4<<16;
38
	ECX = EDI.date.year;
9537 leency 39
	$int 64
9636 leency 40
 
41
	EDI = _time;
42
	EDX += 40<<16;
43
	EBX = 2<<16;
44
	ECX = EDI.time.hours;
9537 leency 45
	$int 64
9636 leency 46
	EDX += 24<<16;
47
	ECX = EDI.time.minutes;
48
	$int 64
49
	EDX += 24<<16;
50
	ECX = EDI.time.seconds;
51
	$int 64
52
 
53
	WriteText(x,y,0x90,color, "  .  .       :  :");
7806 leency 54
}
55
 
5640 pavelyakov 56
#endif