retroforth/source/interfaces/native/x86/cmos-rtc.retro
crc 95afc6391f retro/native: use .retro suffix for driver sources
FossilOrigin-Name: 3a25995e909bee4a46f3f1a6310837ca9d32ad5f88fe2716d573d98227374e58
2019-06-28 16:49:21 +00:00

16 lines
348 B
Text

# 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 ;
~~~