RISCOS.com

www.riscos.com Technical Support:
Programmer's Reference Manual

 

Modules


Introduction and Overview

Message files for help and command keyword table

RISC OS 3.6 introduces facilities for using a message file when outputting text from the help and command keyword table. This is done using a new field in the module header to specify the pathname of the message file, and a new flag in the Help and command keyword table's information word, to indicate the use of the message file.

This makes it easier to internationalise modules.

Changes to existing SWIs

OS_ServiceCall

The list of service calls available in the SWI description obviously refers to RISC OS 3.1, and so is now out of date. For a complete current list, refer to the Numeric index of Service Calls or the Alphabetic index of Service Calls.

Technical details

This section details changes introduced in RISC OS 3.6.

Module header format

The module header has a new field added:

Offset Type Contains
&2C offset to string message file pathname (optional)

The string must be word-aligned and zero-terminated. It gives the pathname of a message file used when outputting text from the help and command keyword table.

Help and command keyword table

The invalid syntax and help fields of the Help and command keyword table still give an offset to a string; this string is either the actual message to output, or a token to be looked up in the message file

Information word

The meaning of the invalid syntax and help strings is set by a new flag in the information word.

Bit 28 = 1

The invalid syntax and help strings are tokens, to be looked up in the message file given in the module header.

The message file

The format of the message file is as follows:

<token>:<text><null byte><linefeed>

The <text> is output by OS_PrettyPrint - but in this case, rather than using the kernel dictionary, it uses the dictionary in:

Resources:Resources.Kernel.Dictionary 

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015