retroforth/source/interfaces/native/x86/cmos-rtc.forth
crc f7a0698486 source tree reorganizations
FossilOrigin-Name: 654eda2d23299be894f94e8b615e7432de6a3bd5dbb6f4caa454cc20e65a510b
2019-05-02 16:25:16 +00:00

16 lines
348 B
Forth

# CMOS RTC
~~~
#112 'CMOS:ADDRESS const
#113 'CMOS:DATA const
:rtc:query CMOS:ADDRESS pio:out-byte CMOS:DATA pio:in-byte ;
:rtc:second #0 rtc:query ;
:rtc:minute #2 rtc:query ;
:rtc:hour #4 rtc:query ;
:rtc:day #7 rtc:query ;
:rtc:month #8 rtc:query ;
:rtc:year #9 rtc:query ;
:time rtc:hour n:put $: c:put rtc:minute n:put nl ;
~~~