Read CMOS clock

OSWord call Action Available on:
(dec) (hex)BBC Master Electron
14 0E Read CMOS clock x

This routine reads from the onboard CMOS clock.

For systems without a CMOS clock, the MOS passes the calls to sideways ROM's for support.

The first byte of the parameter block is a function code representing the action required. The rest of the block's content (including its size) depends on that function.

Return clock value as string

On entry:

XY=0

On exit:

XY+ Length Content Value range
0 24 Date CR-terminated string in form "Day,DD Mon Year.HH:MM:SS".

Return BCD clock value

On entry:

XY=1

On exit:

XY+ Length Content Value range
0 1 year 0x00 0x99
1 1 month 0x01 0x12
0 1 day 0x01 0x31
0 1 day of week 0x01 Sun 0x07 Sat
Notes:
year
0x80-0x99 represents 1980-1999. 0x00-0x79 represents 2000-2079.
day of week
0x00 = not returned

Convert BCD to string

On entry:

XY=1

XY+1…7 the BCD value as returned above

On exit:

XY+1…25 CR terminated string

XY+ Length Content Value range
0 1 year 0x00 0x99

Last modified October 15, 2021: Switch print page breaks to css (d15ab85)