retroforth/vm/nga-c-native-x86/x86/cmos-rtc.retro
crc ea8e12d32a finish reorg of main sources
FossilOrigin-Name: 6a7ee82ed6b024ee1d8f7a51a9b91a66a8041cde06b53cce649d6bd383ae9677
2019-11-22 18:30:02 +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 ;
~~~