Skip to content

Latest commit

 

History

History

setclock

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Setting the V6 system clock automatically

Once we have the time reading code working for V6, it's nice to be able to set the system clock when the system boots.

I decided to use the paper tape reader for this. A call to timecmd.py writes a date setting command to the ptr file by adding

!timecmd.py

just before the boot rk0 statement. The ! prefix to the simulator runs a command. The paper tape reader is now ready to read the tape contents.

It's read by the settime.sh script that should be installed in /etc, it reads the paper tape onto a file in /tmp and execute the date command. To make this work at bootstrap time, add a call to settime.sh to the start of /etc/rc to set the clock.