Table of Contents

Search

  1. Preface
  2. Introduction
  3. Program Design
  4. SSA-NAME3 Functions
  5. Language Specific Guidelines
  6. Controls
  7. Advanced Controls
  8. Address Standardization
  9. ASM Workbench

SSA-NAME3 API Reference Guide

SSA-NAME3 API Reference Guide

Data Types

Data Types

The section discusses the SSA-NAME3 data types used in this document. The
Language Specific Bindings
section describes the mapping between the SSA-NAME3 data types and the native data types used for specific programming languages.

Strings

The
String
data-type is a variable length piece of memory, terminated with a NUL character (0x00).
When using a
String
as an input parameter there is no need to explicitly tell SSA-NAME3 how long it is because SSA-NAME3 can detect its length.
When the API returns a
String
as an output parameter, the caller must allocate memory for it and in some programming languages, tell SSA-NAME3 how long it is. For example, in C it is not possible to detect how long a piece of memory is, so the caller must pass two parameters:
  • the address of the memory, and
  • its length.
SSA-NAME3 uses this information to prevent overwriting unallocated memory (which would result in GPF or core dump).

String Arrays

A
StringArray
is an array of Strings. It consists of an array of pointers, with each pointer pointing to a String. A String Array is usually passed through the API using three parameters:
  • address of the array of pointers,
  • number of pointers in the array, and
  • the length of each String.
Note that since there is provision for only one length value, all Strings must be the same length.

Blocks

A
Block
data-type is a fixed length piece of memory. It is not NUL terminated. If a value is not long enough to fill the entire Block, the Block should be padded with spaces on the right. Since SSANAME3 cannot detect how long the memory is, Blocks are usually passed through the API using two parameters:
  • a pointer to the memory, and
  • the length of the Block

Block Arrays

A
BlockArray
is an array of Blocks. It consists of an array of pointers, with each pointer pointing to a Block. A Block Array is usually passed through the API using three parameters:
  • address of the array of pointers,
  • number of pointers in the array, and
  • the length of each Block.
Since there is provision for only one length value, all Blocks must be the same length.

Nulls and NULs

Some programming languages permit the use of Null pointers (such as C). Null pointers must never be passed as arguments to any API functions. If you do not wish to provide a value for an argument, use a
NUL
terminated (0x00) string instead (a zero-length, empty string).

0 COMMENTS

We’d like to hear from you!