Previous Table of Contents Next

IISC Instruction Encoding

  1. IISC instructions are encoded using the ASCII encoding table, including non-printable control characters.

Temporary Registers

  1. IISC temporary register names are comprised of a series of alphanumeric ASCII characters and the Space character and are delimited by the Data Link Escape code.

    register⇒[a-zA-Z0-9 ]+\x1f
  2. Temporary register names that contain characters other than the set described above shall be rejected.

Special Registers

  1. IISC special purpose registers have static names...

    RegisterEncoding
    Stack/s
    Base/b
    Zero/z
    Instruction/i
  2. Special purpose register encodings are all prefixed with the forward slash character and delimited with the Data Link Escape code.

Word Data Types

  1. Word data types are encoded using single ASCII characters.

    Data TypeEncoding
    Signed Double-wordd
    Unsigned Double-wordD
    Signed Wordw
    Unsigned WordW
    Large Floating PointF
    Signed Half-Wordh
    Unsigned Half-wordH
    Small Floating Pointf
    Signed Quarter-wordq
    Unsigned Quarter-wordQ
    Signed ByteB
    Unsigned Byteb
    Memory Address@

The Shelf Composite Data Type

  1. IISC provides one composite data type, the Shelf. This data type is not word-oriented, but is instead comprised of combinations of word-data types as a composite data type.

  2. The structure of a Shelf must be declared and included with the IISC programs that use it. Each Shelf declared must be identified with a unique symbol.

  3. The Shelf allows the positioning of data to be described acccording to where it lies before or after a base address.

  4. The Shelf is comprised of a number of zero-indexed fields which are grouped into layouts. Each field corresponds to one word data type.

  5. If a field is prefixed with a Space character, that field will be aligned within memory word boundaries.

  6. The indexing of fields is global and is not affected by layout grouping. Each field will recieve an index number corresponding to its position within the entire composite data type declaration.

  7. Each composite data type may have any number of alternative field layouts. Each layout declared corresponds to the same position around the base address.

Shelf Declaration Syntax

  1. The syntax for declaring a Shelf data type is...

    Shelf[ Fields . Name Fields ]
    Name ⇒ [\x20-\x7e]\x00
    Fields
     | Fields Fields
     | { Layout }
    Layout
     | Layout Layout
     | Type
     | Align Type
    Type
     | Word
     | \x00 Name
    Word ⇒ [wWhHqQBb@]
    Align ⇒ \x32
  2. Fields may be either a word data type or the name of another composite data type prefixed by a Null character.

  3. There are two areas in which field layouts may be declared in a Shelf data type, before and after the name for the Shelf declaration. These two areas correspond to the positioning of fields before and after the base address.

  4. Fields declared before the Shelf name are located in memory positions approaching the base address. Fields declared after the Shelf name are located in memory positions leaving the base address. Thus the last field of every layout declared before the Shelf name resides in the last position before the base address, and the first field of every layout declared after the Shelf name begins at the base address.

Accessing Fields

  1. Accessing a field from a base address will calculate an offset from the base address and produce the new offset address.

  2. The syntax for accessing a field is as follows...

    Access\x1a Address Name Index
    Address
     | Register
     | Number
     | Access
    Name ⇒ [\x20-\x7E]+\x00
    Index
     | Register
     | Number
    Number ⇒ \x05[0-9a-f][0-9a-f]{1,16}
  3. Field accesses are prefixed with the Substitute code. Then a base address is provided either by some register's contents or a numerical constant. Next, the name of the Shelf declaration being used is given. Finally, the index of the Shelf field being accessed is provided either by some register's contents or a numerical constant.

  4. Field accesses produce a memory address value.

  5. If a register is used to provide an address or index, that register's contents are assumed to be stored using the Unsigned Word data type format.

Data Type Sizes

  1. The size in bytes of any word or composite data type can be used as a numerical constant by prefixing the name of the type with the Device Control 1 code.

  2. If the data type being queried is a word data type, the single-character encoding must be used and prefixed with the Null character. For example, the size of a Signed Half-word can be used by the string, ░h.

  3. The size of a composite data type is determined by first finding the field layout on each side of the name that occupies the most space. Layouts occupy a number of bytes determined by the sum of the byte-size of each fields' associated word data type and the sum of all additional bytes of padding used for memory aligned fields. The size of a composite data type is then the sum, in bytes, of the largest field layouts from before and after the name.

Instruction Format

  1. The format for IISC instructions is as follows...

    1. Primary Operand
    2. Instruction
    3. Word Data Type Specifier
    4. Secondary Operand
    5. Tertiary Operand
    6. Further Operands
  2. Operands may be one of...

    Where compound data type accesses and symbols provide memory addresses, and numbers and data type sizes provide numerical constants.

  3. The primary operand will always be used in every instruction that requires at least one operand. Secondary, tertiary, and other operands will be used when further operands are required by the instruction.