Made bitmap view and path AppMessage targets. Picture files can now be
[AROS.git] / arch / all-pc / battclock / cmos.h
blob191afdc6ed6302f33667d0a00456438b6686f02d
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CMOS offsets.
6 Lang: English
7 */
9 #ifndef CMOS_H
10 #define CMOS_H
12 #define CENTURY 0x32
13 #define YEAR 0x09
14 #define MONTH 0x08
15 #define MDAY 0x07
16 #define HOUR 0x04
17 #define MIN 0x02
18 #define SEC 0x00
19 #define STATUS_A 0x0A
20 #define STATUS_B 0x0B
21 #define HEALTH 0x0E
23 static inline UBYTE ReadCMOSByte(UBYTE port)
25 UBYTE value;
27 asm volatile("outb %0,$0x70" :: "a"(port));
28 asm volatile("inb $0x71,%0" : "=a"(value));
30 return value;
33 static inline VOID WriteCMOSByte(UBYTE port, UBYTE value)
35 asm volatile("outb %0,$0x70" :: "a"(port));
36 asm volatile("outb %0,$0x71" :: "a"(value));
38 return;
41 #endif /* CMOS_H */