


	CHAPTER 4:   FILE SPECIFICATIONS FOR\HP 95LX BUILT-IN APPLICATIONS

===== HP 95LX APPOINTMENT BOOK FILE FORMAT =====

The HP 95LX Appointment Book file is structured as a file-identification
record, followed by a settings record, followed by a variable number of data
records, and terminated by an end-of-file record. There are multiple types of
data records corresponding to the different types of appointment book entries.

The formats of these appointment book records is described in the following
tables. In the descriptions, the type INT refers to a two-byte integer
stored least significant byte first, the type SWPINT refers to a two-byte
integer stored most significant byte first, the type CHAR refers to a
one-byte integer, and the type ASCII refers to a string of ASCII
characters.

HP 95LX APPOINTMENT BOOK FILE IDENTIFICATION RECORD
---------------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	-----	---------------------
  0		ProductCode	int	-1 (FFh, FFh).
  2		ReleaseNum	int	1 (01h, 00h).
  4		FileType	char	1 (01h).


HP 95LX APPOINTMENT BOOK SETTINGS RECORD
----------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	-----	---------------------
  0		StartTime	int	Daily display start time as the number
					of minutes past midnight.
  2		Granularity	int	Daily display time line granularity in
					minutes.
  4		AlarmEnable	char	1 = on, 0 = off.
  5		LeadTime	char	Alarm default lead time in minutes.
  6		CarryForward	char	To do carry forward default:
					1 = on, 0 = off.


HP 95LX APPOINTMENT BOOK DAILY DATA RECORD
------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	-----	----------------------
  0		RecordType	char	1 (01h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ApptState	char	See note 2.
  4		Year		char	Year counting from 1900.
  5		Month		char	Month, 1 - 12.
  6		Day		char	Day, 1 - 31.
  7		StartTime	swpint	Start time in minutes since midnight.
  9		EndTime		int	End time in minutes since midnight.
  11		LeadTime	char	Alarm lead time in minutes, 0 - 30.
  12		ApptLength	char	Length of appointment text in bytes.
  13		NoteLength	int	Length of note text in bytes.
  15		ApptText	ASCII	Appointment text - see note 4 below.
  15+ApptLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.


HP 95LX APPOINTMENT BOOK WEEKLY DATA RECORD
-------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	-----	-----------------------
  0		RecordType	char	2 (02h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ApptState	char	See note 2.
  4		DayOfWeek	char	Day of week, 1 = Sun., ..., 7 = Sat.
  5		StartTime	swpint	Start time in minutes since midnight.
  7		StartYear	char	Start year counting from 1900.
  8		StartMonth	char	Start month, 1 - 12.
  9		StartDay	char	Start day, 1 - 31.
  10		EndTime		int	End time in minutes since midnight.
  12		EndYear		char	End year counting from 1900.
  13		EndMonth	char	End month, 1 - 12.
  14		EndDay		char	End day, 1 - 31.
  15		LeadTime	char	Alarm lead time in minutes, 0 - 30.
  16		ApptLength	char	Length of appointment text in byte.s
  17		NoteLength	int	Length of note text in bytes - see
					note 5 below.
  19		ApptText	ASCII	Appointment text - see note 4 below.
  19+ApptLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.


HP 95LX APPOINTMENT BOOK MONTHLY BY DATE DATA RECORD
----------------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	----------------------------
  0		RecordType	char	3 (03h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ApptState	char	See note 2.
  4		DayOfMonth	char	Day of month, 1 - 31.
  5		StartTime	swpint	Start time in minutes since midnight.
  7		StartYear	char	Start year counting from 1900.
  8		StartMonth	char	Start month, 1 - 12.
  9		StartDay	char	Start day, 1 - 31.
  10		EndTime		int	End time in minutes since midnight.
  12		EndYear		char	End year counting from 1900.
  13		EndMonth	char	End month, 1 - 12.
  14		EndDay		char	End day, 1 - 31.
  15		LeadTime	char	Alarm lead time in minutes, 0 - 30.
  16		ApptLength	char	Length of appointment text in bytes.
  17		NoteLength	int	Length of note text in bytes.
  19		ApptText	ASCII	Appointment text - see note 4 below.
  19+ApptLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.


HP 95LX APPOINTMENT BOOK MONTHLY BY POSITION DATA RECORD
--------------------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	-------------------------------
  0		RecordType	char	4 (04h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ApptState	char	See note 2.
  4		WeekOfMonth	char	Week of month, 1 - 5.
  5		DayOfWeek	char	Day of week, 1 = Sun., ..., 7 = Sat.
  6		StartTime	swpint	Start time in minutes since midnight.
  8		StartYear	char	Start year counting from 1900.
  9		StartMonth	char	Start month, 1 - 12.
  10		StartDay	char	Start day, 1 - 31.
  11		EndTime		int	End time in minutes since midnight.
  13		EndYear		char	End year counting from 1900.
  14		EndMonth	char	End month, 1 - 12.
  15		EndDay		char	End day, 1 - 31.
  16		LeadTime	char	Alarm lead time in minutes, 0 - 30.
  17		ApptLength	char	Length of appointment text in bytes.
  18		NoteLength	int	Length of note text in bytes.
  20		ApptText	ASCII	Appointment text - see note 4 below.
  20+ApptLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.

HP 95LX APPOINTMENT BOOK YEARLY DATA RECORD
-------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	--------------------------------
  0		RecordType	char	5 (05h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ApptState	char	See note 2.
  4		MonthOfYear	char	Month of year, 1 = Jan., ..., 12 = Dec.
  5		DayOfMonth	char	Day of month, 1 - 31.
  6		StartTime	swpint	Start time in minutes since midnight.
  8		StartYear	char	Start year counting from 1900.
  9		StartMonth	char	Start month, 1 - 12.
  10		StartDay	char	Start day, 1 - 31.
  11		EndTime		int	End time in minutes since midnight.
  13		EndYear		char	End year counting from 1900.
  14		EndMonth	char	End month, 1 - 12.
  15		EndDay		char	End day, 1 - 31.
  16		LeadTime	char	Alarm lead time in minutes, 0 - 30.
  17		ApptLength	char	Length of appointment text in bytes.
  18		NoteLength	int	Length of note text in bytes.
  20		ApptText	ASCII	Appointment text - see note 4 below.
  20+ApptLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.


HP 95LX APPOINTMENT BOOK TO DO DATA RECORD
------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	------------------------------------
  0		RecordType	char	6 (06h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see note 1.
  3		ToDoState	char	See note 3.
  4		Priority	char	Priority, 1 - 9.
  5		StartYear	char	Start year counting from 1900.
  6		StartMonth	char	Start month, 1 - 12.
  7		StartDay	char	Start day, 1 - 31.
  8		CheckOffYear	char	Check off year counting from 1900;
					0 indicates not checked off.
  9		CheckOffMonth	char	Check off month, 1 - 12; 0 indicates
					not checked off.
  10		CheckOffDay	char	Check off day, 1 - 31; 0 indicates not
					checked off.
  11		ToDoLength	char	Length of to do text in bytes.
  12		NoteLength	int	Length of note text in bytes.
  14		ToDoText	ASCII	To do text - see note 4 below.
  14+ToDoLength	NoteText	ASCII	Note text where the null character is
					used as the line terminator - see
					note 5 below.


HP 95LX APPOINTMENT BOOK END OF FILE RECORD
-------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	-----------------------------------
  0		RecordType	char	50 (32h).
  1		RecordLength	int	0 (00h, 00h).


==== NOTES: ====

* Files created by the Appointment Book application may contain some padding
following the last field of some data records. Hence, the RecordLength field
must be used to determine the start of the next record. Appointment book files
created by other programs do not require any padding.

* ApptState has several bit fields. Only bit 0 is meaningful to software
processing an appointment book file. Bit 0 being set or cleared corresponds to
the alarm being enabled or disabled. Programs creating Appointment book files
should clear all bits, except perhaps bit 0.

* ToDoState has two one-bit bit fields. Bit 0 being set or cleared
corresponds to `carry forward' being enabled or disabled for this todo item.
Bit 1 being set or cleared corresponds to the doto being checked off or not
checked off.

* Appointment and ToDo texts are each limited to a maximun of 27 charatcers.

* Note text is limited to a maximum of 11 lines of 39 characters per line
(not counting the line terminator).


===== HP 95LX Phone Book File Format =====

An HP 95LX Phone Book file is structured as a file-identification record,
followed by a variable number of phone book data records, and terminated by an
end-of-file record. Each data record contains the information for one phone
book entry.

The formats of these phone book records is described in the following tables.
In the descriptions, the type INT refers to a two-byte integer stored
least significant byte first, the type CHAR refers to a one-byte integer,
and the type ASCII refers to a string of ASCII characters.

HP 95LX PHONE BOOK FILE IDENTIFICATION RECORD
---------------------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	------	--------------------------------
  0		ProductCode	int	-2 (FEh, FFh).
  2		ReleaseNum	int	1 (01h, 00h).
  4		FileType	char	3 (03h).


HP 95LX PHONE BOOK DATA RECORD
------------------------------

 Byte Offset	Name		Type	Contents
 -----------	------------	------	-----------------------------------
  0		RecordType	char	1 (01h).
  1		RecordLength	int	Number of bytes in the remainder of
					this data record - see NOTE below.
  3		NameLength	char	Length of name text in bytes.
  4		NumberLength	char	Length on number text in bytes.
  5		AddressLength	int	Length of address text in bytes.
  7		NameText	ASCII	Name text, 30 characters maximum.
  7+NameLength	NumberText	ASCII	Number text, 30 characters maximum.
  7+NameLength+
   NumberLength	AddressText	ASCII	Address text where the null character
					is used as the line terminator.
					Addresses are limited to a maximum of
					8 lines of 39 characters per line (not
					counting the line terminator).


HP 95LX PHONE BOOK END OF FILE RECORD

 Byte Offset	Name		Type	Contents
 -----------	-------------	-----	------------------------------------
  0		RecordType	char	2 (02h).
  1		RecordLength	int	0 (00h, 00h).

************
* NOTE !!! *
************
Files created by the Phone Book application may contain some padding following
the last field of some data records. Hence, you must use the RecordLength
field to determine the start of the next record.  Phone book files created by
other programs do not require any padding.
************
* NOTE !!! *
************

