Generate Universal Unique Identifier (GENUUID)

Instruction Syntax

Op Code (Hex) Operand 1
011D UUID return template
Operand 1: Space pointer.

Bound Program Access
Built-in number for GENUUID is 461.
GENUUID (
         UUID_return_template   : address
)

Description:

This instruction generates a universal unique identifier and returns it in the template provided. The UUID is unique as an identifier across all time and space and is consistent with the Open Systems Foundation (OSF) Distributed Computing Environments (DCE) version 1 UUID specification described in the DCE's "Architecture Environment Specification/Distributed Computing: for Remote Procedure Calls", Appendix A.

The template identified by operand 1 must be 16 byte aligned. The 16 byte Universal Unique Identifier (UUID) is returned in the UUID return template.

The UUID return template (operand 1) has the following format:

Offset  
Dec Hex Field Name Data Type and Length
0 0 Return template size specification Char(8)
0 0
  • Number of bytes provided
  • UBin(4)
4 4
  • Number of bytes available
  • UBin(4)
8 8 Reserved (binary 0) Char(8)
16 10 Returned UUID Char(16)

32

20

--- End ---

 

The first 4 bytes of the template identify the total number of bytes provided for use by the instruction. The value is supplied as input to the instruction and is not modified by the instruction. A value of less than 32 causes a template size invalid (hex 3802) exception to be signaled.

The second 4 bytes of the template identify the total number of bytes available to be returned. This value is output. The value is the size of the template.

The reserved field must be set to zeros or a template value invalid (hex 3801) exception will be signaled.

The returned UUID field contains the generated UUID. The UUID is a DCE version 1 UUID.

Note: There are certain restrictions on the UUID that should be remembered:

  • Operations on the UUID should be limited to:
    • Equality comparison (equal or not equal)
    • Lexical ordering - UUIDs can be ordered based on the most significant byte that differs between the compared UUIDs.
    • String conversion - based on the DCE architecture string representation of a UUID.

Authorization Required

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
  • 08 Argument/Parameter
    • 0801 Parameter Reference Violation
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 24 Pointer Specification
    • 2401 Pointer Does Not Exist
    • 2402 Pointer Type Invalid
  • 32 Scalar Specification
    • 3201 Scalar Type Invalid
  • 38 Template Specification
    • 3801 Template Value Invalid
    • 3802 Template Size Invalid
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation
    • 4402 Literal Values Cannot Be Changed