RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

OS_Word 14_1 BCD Format

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_Word
» OS_Word 14
» OS_Word 14,1
» BCD Format

BCD Format

Offset Contents
+0 Year (0-99)
+1 Month (1-12)
+2 Day of month (1-31)
+3 Day of week (1-7, where 1 = Sunday)
+4 Hour (0-23)
+5 Minute (0-59)
+6 Second (0-59)

Notes

OS_Word 14, with a reason code of 1, reads the time directly from the CMOS clock.

The time is returned in a Binary Coded Decimal (BCD) format.

OS_Word 14,1 is not Y2K compliant since it returns only a two-digit value for year. As such, this call is deprecated.

The year shall be returned as a BCD with a value within the range 0..99.
The range 0..65 should be assumed to be post 1999, and the range 66..99
to be pre 2000.

Example for year

Value Year represented
0 2000
20 2020
40 2040
60 2060
65 2065
66 1966
80 1980
99 1999

See also

  • OS_Word
  • OS_Word 14
  • OS_Word 14,1
Created on December 4, 2009 21:27:43 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: OS_Word 14_1

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys