Machine Instructions

This appendix introduces the additional machine instructions supported by OpenFrame ASM.

1. OFATOE

  • Usage

    OFATOE D1(L1,B1),D2(B2)

The following describes details about OFATOE:

Overview

  • Format: SS format

  • Opcode: 0xF6

  • Length: 6 bytes

Description

The area pointed to by the first operand is assumed to contain an ASCII string.
The string is overwritten by converting it from an ASCII to EBCDIC using the cpm file specified in ASCII_TO_EBCDIC under USE_CODE_CONVERSION in the properties.conf file.

Condition Code

  • 0: Success

  • 1: Undefined

  • 2: Undefined

  • 3: Code conversion failed

2. OFETOA

  • Usage

    OFETOA D1(L1,B1),D2(B2)

The following describes details about OFETOA:

Overview

  • Format: SS format

  • Opcode: 0xF7

  • Length: 6 bytes

Description

The area pointed to by the first operand is assumed to contain an EBCDIC string.
The string is overwritten by converting it from EBCDIC to ASCII using the cpm file specified in EBCDIC_TO_ASCII under USE_CODE_CONVERSION in the properties.conf file.

Condition Code

  • 0: Success

  • 1: Undefined

  • 2: Undefined

  • 3: Code conversion failed

3. OFADBGREG

  • Usage

    OFADBGREG I1

The following describes details about OFADBGREG:

Overview

  • Format: I format

  • Opcode: 0xFE

  • Length: 2 bytes

Description

The function varies depending on the number passed to the first operand. Refer to the following for detailed functions:

  • 0-15: Prints to stdout the value stored in the register corresponding to each number and the current CC value in the following format.

    Reg=[<integer value>], Hex=[<8-byte hexadecimal value>], CC=[<integer value>]
  • 16: Prints all register values.

  • 100-115: Activates the watch function for the register corresponding to the last two digits. Whenever the value of the register changes, the previous value and the new value are printed to stdout. When this command is executed for the first time, the following messages are displayed.

    OFASM: OFADBGREG[<operand value>], ADD WATCH REGISTER [<register value>]
    OFASM: WATCHING REGISTER = <register value>

    Afterwards, whenever the register value changes, it is printed in the following format.

    REG=[<register value>]
    OLD=[<8-byte hexadecimal value>]
    NEW=[<8-byte hexadecimal value>]
  • 180-189: Initializes the internal STOPWATCH and restarts it. The STOPWATCH with the ID corresponding to the last digit (0-9) is activated.

  • 190-199: Prints the elapsed time since the last use of 18X. The STOPWATCH with the ID corresponding to the last digit (0 - 9) is stopped. This command can be used multiple times.

    OFADBGREG 180   // Initializes STOPWATCH 0.
    OFADBGREG 181   // Initializes STOPWATCH 1.
    OFADBGREG 190   // Prints the elapsed time since STOPWATCH 0 was used.
    OFADBGREG 191   // Prints the elapsed time since STOPWATCH 1 was used.

    The 19X commands can be used multiple times as follows:

    OFADBGREG 182   // Initializes STOPWATCH 2.
    OFADBGREG 192   // 1st elapsed time output
    OFADBGREG 192   // 2nd elapsed time output
    OFADBGREG 192   // 3rd elapsed time output
    OFADBGREG 192   // 4th elapsed time output

    In this case, the elapsed times since the last uses of 18X command are printed in order.

    The following message is displayed at the time the 19X command is executed.

    OFASM STOPWATCH IDX[X]: 28.954337ms // [X] is the ID number.
  • 200-209: Applies only to debug binaries. Activates the log level according to the value corresponding to the last digit. However, if the OFASM_LOG_AFTER value in properties.conf is set to 0, no output will be printed. When the command is executed, the following format is used:

    OFASM: OFADBGREG[<operand value>], SET OFASM_LOG_LEVEL[<log level>]

Condition Code

  • Unchanged

4. OFADBGMEM

  • Usage

    OFADBGMEM D1(L1,B1),D2(B2)

The following describes details about OFADBGMEM:

Overview

  • Format: SS format

  • Opcode: 0xFF

  • Length: 6 bytes

Description

Performs a memory dump for the area pointed to by the first operand. Provides the following functions based on the format specified by the second operand.

  • 0: Performs a memory dump in the following format.

    Length=[<length value>], Hex=[<hexadecimal value>]
  • 1: Performs a memory dump in the following format.

    Addr=[<memory address>], Length=[<length value>], Hex=[<hexadecimal value>]
  • 2: Performs a memory dump in the following format.

    Addr=[<memory address>], Length=[<length value>], Hex=[<hexadecimal value>], Char=[<converted character value>]
  • 3: Performs a memory dump in the following format.

    Program=[<program name>], Symbol=[<symbol name>], Length=[<length value>], Hex=[<hexadecimal value>]
  • 4/5: Performs a memory dump in the following format, assuming that the area pointed to by the first operand contains an HFP (Hexadecimal Floating Point) value. The value of the area is converted to a BFP (Binary Floating Point) value and displayed. 4 outputs the result in Short BFP format, and 5 outputs it in Long BFP format.

    Addr=[<memory address>], Length=[<length value>], Hex=[<hexadecimal value>], BFP=[<converted BFP value>]
  • Literal: Activates the memory watch function for the length specified as the literal value. When an update occurs in the area pointed to by the first operand, the previous and new values are printed.

    Addr=[<memory address>], Length=[<length value>], Hex=[<hexadecimal value>]
    OFASM: WATCHING LOCATION:LENGTH = <memory address>:<length value>

    Afterwards, whenever the memory value changes, it is printed in the following format.

    Addr = [<memory address>], SIZE = [length value]
    OLD=[<hexadecimal value>]
    NEW=[hexadecimal value]

Condition Code

  • Unchanged

5. OFNUMCHK

  • Usage

    OFNUMCHK D2(B2)

The following describes details about OFNUMCHK:

Overview

  • Format: S format

  • Opcode: 0x0203

  • Length: 4 bytes

Description

The operand points to a 1-byte memory address.
Checks whether the value stored in the memory address is within the range of 0x30 to 0x39 (numeric characters in ASCII).

Condition Code

  • 0: The target value is not in the range 0x30 to 0x39.

  • 1: The target value is 0x30.

  • 2: The target value is in the range 0x31 to 0x39.

  • 3: Undefined