Subversion Repositories Kolibri OS

Rev

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

  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.  
  16. :struct time
  17. {
  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;
  27.         EAX = 47;
  28.         EBX = 2<<16;
  29.         EDX = x<<16+y;
  30.         ESI = 0x90<<24+color;
  31.         ECX = EDI.date.day;
  32.         $int 64
  33.         EDX += 24<<16;
  34.         ECX = EDI.date.month;
  35.         $int 64
  36.         EDX += 24<<16;
  37.         EBX = 4<<16;
  38.         ECX = EDI.date.year;
  39.         $int 64
  40.  
  41.         EDI = _time;
  42.         EDX += 40<<16;
  43.         EBX = 2<<16;
  44.         ECX = EDI.time.hours;
  45.         $int 64
  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, "  .  .       :  :");
  54. }
  55.  
  56. #endif