Some Private Use Area code points for courtyard codes for special functions.

Courtyard codes provide a number of functions. Some of these functions, such as selecting a specific colour to use and choosing a specific point size, each use just one code point. Some other of these functions provide some other functions, such as setting up the colour components of colour 98 and colour 99, which use one code point to select a function and also use the value in the accumulator register of the courtyard codes system as an item of data to act as a parameter for the function.

There is, however, another possibility for using functions within the courtyard codes system. The functions which use this other possibility are termed special functions.

In order to use special functions the courtyard codes system defines a special function register, which is just an integer.

The idea is that a copy of the contents of the accumulator register can be copied into the special function register, the accumulator register then possibly being loaded with another number and then the special function carried out.

Some special functions are free-standing and some use the data in the accumulator register as a parameter.

Naturally, using a special function needs more setting up within a document, yet the special function technique is only used for rarer functions and provide a convenient way to have available within the courtyard codes system as many special functions as are found to be needed, while keeping all courtyard codes within the U+F3.. block of the Unicode Private Use Area.

It is important to remember that use of special function codes need not be implemented in any particular use of courtyard codes. This follows on from the general principle that any particular application of courtyard codes need only use those courtyard codes which are chosen for use by the programmer of the system which uses them. However, there is a qualitative difference as well in that these special functions are often quite specialised, so it is only necessary that they be implemented in a system which is designed to make use of the features for which special functions are provided. This is a delicate balance of design considerations in the courtyard codes system. The special function facility is included in the courtyard codes system so that a large number of special facilities may be provided within the protection of the courtyard, yet those facilities are special to the extent that they are not expected to be included in most software implementations which use courtyard codes at the present time.

U+F3AA COPY THE CONTENTS OF THE ACCUMULATOR REGISTER TO THE SPECIAL FUNCTION REGISTER

U+F3AB OBEY THE SPECIAL FUNCTION WHOSE CODE IS IN THE SPECIAL FUNCTION REGISTER

The U+F3AB code may or may not use the data in the accumulator register depending upon what is the value in the special function register when the U+F3AB code is obeyed.


This document contains some special functions and their code numbers. Special function code numbers are stated in base 10 numbers. The special function codes in this document concern colour definition and selection. The including of these special function codes in this document helps to explain the use of special functions generally as well as detailing these particular special function codes.

For the avoidance of doubt it is here mentioned that special functions are intended to be useful for many purposes, not just colour definition and selection.


Normally, colours are represented by 8 bits for each of red, green and blue. However, in really specialised systems 16 bits might be used for each colour component. These two codes are provided so that courtyard codes could be used to indicate that feature from within a document. These codes might never be used, yet are included for completeness. It is emphasised that there is no need to use special function 908 to initialize a system to have 8 bits for red, green and blue, for that is presumed at start up. Special function 908 is only included for completeness so that a document which has used special function 916 may revert to the original setting if so desired.

908 ALL SUBSEQUENT REFERENCES TO COLOUR ARE 8 BITS EACH FOR RED, GREEN, BLUE

916 ALL SUBSEQUENT REFERENCES TO COLOUR ARE 16 BITS EACH FOR RED, GREEN, BLUE

As an example of use, if one wished to use 16 bit colour data with other courtyard codes, one would first set that choice by using the following.

U+F3A0 U+F3A7 U+F399 U+F391 U+F396 U+F3AA U+F3AB

U+F3A0 SET THE BASE VALUE TO DECIMAL 10.

U+F3A7 SET THE ACCUMULATOR VALUE TO 0.

U+F399 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 9.

U+F391 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 1.

U+F396 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 6.

U+F3AA COPY THE CONTENTS OF THE ACCUMULATOR REGISTER TO THE SPECIAL FUNCTION REGISTER

U+F3AB OBEY THE SPECIAL FUNCTION WHOSE CODE IS IN THE SPECIAL FUNCTION REGISTER


Here are some special function codes which may be used with either 8 bits for each colour component or with 16 bits for each colour component depending upon the setting of how many bits are used for each colour component.

These codes are included for two purposes. One purpose is so that a total of five user specified colours are available. This is intended for comprehensiveness of provision of colour selection in case chromatic font technology takes off. The other purpose is to allow an alpha component to be specified for each of these five user definable colours, so that not only colour 95, colour 96 and colour 97 may have an alpha component defined, yet so that colour 98 and colour 99 may also have an alpha component defined.

The alpha component specifies the opacity of a colour, as between opacity and transparency. For example, please see sections G.1.4 and G.1.5 of the DVB-MHP specification (Digital Video Broadcasting - Multimedia Home Platform specification) obtainable at the http://www.mhp.org website. In section G.1.5 of that document, a transparency of 0% is an alpha of 255, a transparency of 30% is an alpha of 179 and a transparency of 100% is an alpha of 0. A transparency of 0% means fully opaque. A transparency of 100% means fully transparent.

For the purposes of courtyard codes using 8 bits for each colour component, where an alpha value is not specified, it shall be assumed to be 255 if a value of alpha is required by the rendering system: that is, colours defined without any mention of alpha are fully opaque. The default colours for colour 95, colour 96, colour 97, colour 98 and colour 99 are fully opaque black.

950 COLOUR 95

951 SET THE RED COMPONENT OF COLOUR 95 TO THE VALUE OF THE ACCUMULATOR

952 SET THE GREEN COMPONENT OF COLOUR 95 TO THE VALUE OF THE ACCUMULATOR

953 SET THE BLUE COMPONENT OF COLOUR 95 TO THE VALUE OF THE ACCUMULATOR

954 SET THE ALPHA COMPONENT OF COLOUR 95 TO THE VALUE OF THE ACCUMULATOR

960 COLOUR 96

961 SET THE RED COMPONENT OF COLOUR 96 TO THE VALUE OF THE ACCUMULATOR

962 SET THE GREEN COMPONENT OF COLOUR 96 TO THE VALUE OF THE ACCUMULATOR

963 SET THE BLUE COMPONENT OF COLOUR 96 TO THE VALUE OF THE ACCUMULATOR

964 SET THE ALPHA COMPONENT OF COLOUR 96 TO THE VALUE OF THE ACCUMULATOR

970 COLOUR 97

971 SET THE RED COMPONENT OF COLOUR 97 TO THE VALUE OF THE ACCUMULATOR

972 SET THE GREEN COMPONENT OF COLOUR 97 TO THE VALUE OF THE ACCUMULATOR

973 SET THE BLUE COMPONENT OF COLOUR 97 TO THE VALUE OF THE ACCUMULATOR

974 SET THE ALPHA COMPONENT OF COLOUR 97 TO THE VALUE OF THE ACCUMULATOR

984 SET THE ALPHA COMPONENT OF COLOUR 98 TO THE VALUE OF THE ACCUMULATOR

994 SET THE ALPHA COMPONENT OF COLOUR 99 TO THE VALUE OF THE ACCUMULATOR

As an example of use, if one wished to set the green component of colour 97 to 255 decimal one could use the following.

U+F3A0 U+F3A7 U+F399 U+F397 U+F392 U+F3AA U+F3A7 U+F392 U+F395 U+F395 U+F3AB

U+F3A0 SET THE BASE VALUE TO DECIMAL 10.

U+F3A7 SET THE ACCUMULATOR VALUE TO 0.

U+F399 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 9.

U+F397 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 7.

U+F392 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 2.

U+F3AA COPY THE CONTENTS OF THE ACCUMULATOR REGISTER TO THE SPECIAL FUNCTION REGISTER

U+F3A7 SET THE ACCUMULATOR VALUE TO 0.

U+F392 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 2.

U+F395 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 5.

U+F395 MULTIPLY THE CONTENTS OF THE ACCUMULATOR REGISTER BY THE BASE VALUE AND ADD DECIMAL 5.

U+F3AB OBEY THE SPECIAL FUNCTION WHOSE CODE IS IN THE SPECIAL FUNCTION REGISTER


Certainly, this use of a special function code takes more code points than using an ordinary code point, yet the special function technique does allow many more facilities to be provided within the courtyard codes system.

William Overington

17 July 2002


 

This file is accessible as follows.

http://www.users.globalnet.co.uk/~ngo/courtspe.htm