Skip to content
Jiří Malák edited this page Feb 19, 2021 · 9 revisions
Table of Contents

Introduction

This page deals with information relevant to the task of re-coding and documenting wgml and gendev which is not directly tied with a more specific topic.

The type of content will vary by section. Some will have the nature of a technical summary or overview. Others will be more theoretical.

Special Tags

The :CMT. Tag

It might be thought that the :CMT. tag could be used anywhere, but this turns out not to be the case, at least not for gendev.

Thus, when attributes are said elsewhere in this Wiki to be "required" this generally means that an error occurs when a :CMT. tag is placed in front of the attribute. Further testing suggests that, since attribute order does not appear important, gendev, at least, checks for attributes until the next tag is found and then reports an error if it hasn't found them all. Testing by moving the attribute out of the block produces the same error when the end-tag is encountered before all of the attributes are seen.

Inserting a :CMT. in the middle of, say, an :INTRANS block produces an SN-037 error (Expecting :eintrans tag), showing that free-form blocks appear to be processed this way: all items are accepted up to the next tag, which must be the one expected.

The :INCLUDE. Tag

The :INCLUDE. tag can be placed in the text files to accomplish several goals:

  1. A file consisting of nothing but :INCLUDE tags can be used to build an entire library with one invocation of gendev.
  2. Clearly, then, :INCLUDE tags can be used before or after a :DEVICE, :DRIVER or :FONT block to process other source files.
  3. Files containing parts of blocks can be included at the proper point in the enclosing blook; for example, an :INTRANS block can be introduced into a :DEVICE block by using :INCLUDE with a file containing the :INTRANS block.

Designators

"Count" Fields

The binary device file contains several fields which contain a value equal to the number of bytes in the following field or fields. The most common value is "0x02", but "0x01", "0x03", "0x04", and "0x0f" also occur. These fields are called count (except in the PauseBlock, where there are four of them which must be distinguished) and shown with their fixed value, but are not otherwise commented on. They are mentioned here because they might otherwise be confused with Designators. Note that count is also used for fields containing variable data, which may be commented on.

Designators

These are the designators used in binary device files:

  • 0x0101 -- a number was used for the attribute font in a :BOX or :UNDERSCORE Block.
  • 0x0201 -- a character string was used for the attribute font in a :BOX or :UNDERSCORE Block.
  • 0x1200 -- the numeric :DEVICE, :PAGESTART, and :PAGEOFFSET attributes are 16-bit unsigned integers.
  • 0x2200 -- the numeric :DEVICE, :PAGESTART, and :PAGEOFFSET attributes are 32-bit unsigned integers.

These are the designators used in binary driver files:

  • 0x01 -- the value START was used for the attribute place in an :INIT block or the value END was used for the attribute place in a :FINISH block.
  • 0x02 -- the value DOCUMENT was used for the attribute place in an :INIT block or in a :FINISH block.

These are the designators used in binary font files:

  • 0x1700 -- the numeric :FONT attributes are mixed (some are 16-bit, others are 32-bit) unsigned integers.
  • 0x1D00 -- the numeric :FONT attributes are (all) 32-bit unsigned integers.

These are the designators for the various types of CodeBlocks:

  • 0x00 -- the CodeBlock encodes a :VALUE block.
  • 0x02 -- the CodeBlock encodes a :FONTVALUE block.
  • 0x04 -- the CodeBlock encodes an :ENDVALUE block not within a :LINEPROC block.
  • 0x05 -- the CodeBlock encodes a :STARTVALUE block not within a :LINEPROC block.
  • 0x08 -- the CodeBlock encodes an :ENDVALUE block within a :LINEPROC block.
  • 0x09 -- the CodeBlock encodes a :STARTVALUE block within a :LINEPROC block.
  • 0x28 -- the CodeBlock encodes an :ENDWORD block.
  • 0x29 -- the CodeBlock encodes a :STARTWORD block.
  • 0x49 -- the CodeBlock encodes a :FIRSTWORD block.

These are the designators used with the :INTRANS, :OUTTRANS, and :WIDTH Blocks:

  • 0x81 -- the start of a table of 0x100 one-byte values.
  • 0x82 -- the start of a table of 0x100 two-byte values.
  • 0x84 -- the start of a table of 0x100 four-byte values.

Although 0x81 is always used with :INTRANS blocks, and 0x82 is always used with :OUTTRANS blocks, a :WIDTH block can be encoded with any of them (depending on the binary file format version).

Related Items

While not designators as such, these items are clearly related:

  • 0x0001 -- apparent metatype indicating start of expanded DirEntry instance.
  • 0x0101 -- used in directory files to indicate that a given DirEntry instance is for a binary device file.
  • 0x0201 -- used in directory files to indicate that a given DirEntry instance is for a binary driver file.
  • 0x0401 -- used in directory files to indicate that a given DirEntry instance is for a binary font file.
Clone this wiki locally