Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7707 Alex2003 1
2
xmlns:o="urn:schemas-microsoft-com:office:office"
3
xmlns:w="urn:schemas-microsoft-com:office:word"
4
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
5
xmlns="http://www.w3.org/TR/REC-html40">
6
 
7
8
9
10
11
12
13
31
32
33
332
418
448
449
 
450
451
 
452
453
 
454

Back

457
style='mso-ansi-language:RU'> to main
458
style='mso-bidi-font-weight:normal'>

459
 
460

 

463
 
464

Function 22 -

467
set the system date / time

468
 
469

 

472
 
473

Options:

476
 
477

  * eax = 22

480
- function number

481
 
482

  * ebx = 0

485
- set the time

486
 
487

    * ecx

490
= 0x00SSMMHH - time in binary coded decimal code (BCD):

491
 
492

    * HH = hour 00..23

495
 
496

    * MM = minute 00..59

499
 
500

    * SS = second 00..59

503
 
504

  * ebx = 1

507
- set the date

508
 
509

    * ecx

512
= 0x00DDMMYY - the date in the binary decimal code (BCD):

513
 
514

    * DD = day 01..31

517
 
518

    * MM = month 01..12

521
 
522

    * YY = year 00..99

525
 
526

  * ebx = 2

529
- set the day of the week

530
 
531

    * ecx

534
= 1 for sunday, ..., 7 for saturday

535
 
536

  * ebx = 3

539
- set the alarm

540
 
541

    * ecx

544
= 0x00SSMMHH

545
 
546

Return value:

549
 
550

  * eax = 0

553
- successful

554
 
555

  * eax = 1

558
- the parameter is set incorrectly

559
 
560

  * eax = 2

563
- CMOS-batteries are out

564
 
565

 

567
 
568

Remarks:

571
 
572

  The value of the

575
installation of the day of the week seems doubtful, since it is not used very
576
much (the day of the week can be calculated by date).

577
 
578

  The alarm can be set

581
to operate at a specified time every day. At the same time, it cannot be
582
disabled by the existing system functions.

583
 
584

  The alarm is

587
triggered by the generation of IRQ8.

588
 
589

  In fact, CMOS supports

592
setting the value 0xFF as one of the parameters for an alarm and means that the
593
corresponding parameter is ignored. But in the current implementation it will
594
not work (return value 1).

595
 
596

  Alarm clock is a

599
global system resource; setting the alarm automatically cancels the previous
600
setting. However, at the moment no program uses it.

601
 
602

 

605
 
606

Constants for registers:

609
 
610

  eax -

613
SF_SET_TIME_DATE (22)

614
 
615
616
 
617
618
 
619