I have solved the problem up to a point, making a device driver still seems daunting at this stage.
OK - for future posterity,
link to the github
Attached here is my Clock Code - Written in GW basic...
clk.bas - runs from my autoexec.bat to sync the dos clock to the hardware clock.
You need to have the GWBASIC file on your disk. I did not try with QBASIC, BASIC or BASICA yet.
This works, but it is slow to load the GWBASIC interpreter from floppy at boot time, it runs, sets the clock and then exits to dos.
this program is 30 lines. Not sure if I could compile to an EXE or COM ?
The Autoexec.bat line reads :
GWBASIC CLK.BAS
clock.bas - is used for setting the clock for the first time after you give it a new coin cell.
this program is not well optimized - needs tidying up.
the registers are set from minutes to decades.