Proctal

Documentation

Type options

Commands like read, write, search and measure deal with values that can be configured with a common set of options. These are known as type options.
To choose a type you pass the appropriately named --type option one of the following values:

  • byte

  • integer

  • ieee754

  • text

  • address

  • x86

  • arm

  • sparc

  • powerpc

  • mips

The following sections will describe each type and their specific options individually.

Byte

This is the most basic type of them all. It represents a unit of memory. Its size is always 1. When printed, the sequence of bits that form it are represented as an unsigned integer in hexadecimal notation.
This type does not have specific options.

Integer

An integer number can be represented in various ways. Proctal supports 8, 16, 32 and 64 bit wide integers, either unsigned or using the two's complement representation for negative numbers and either in little or big endian. It's printed with decimal numbers.
The --integer-endianness option can be used to set the endianness. You can choose between big and little.
The --integer-bits option can be used to set the number of bits. Only 8, 16, 32 and 64 are supported at the moment.
The --integer-sign option can be used to set the sign representation. twos-complement uses two's complement. unsigned disregards signing altogether.
By default an integer is 8-bit, signed using two's complement and using the same endianness that the system uses.

IEEE754

These numbers are represented as defined by the IEEE 754-1985 standard. It's printed with decimal numbers.
The --ieee754-precision option allows you to pick the precision. You may use single, double or extended.
By the default a floating point number uses single precision.

Text

Text is a single character from a character set. It's printed in UTF-8.
The --text-encoding option defines the charater set to use. At the moment the only value that is supported is ascii.
By default text uses the ASCII encoding.

Address

This represents a memory address in the computer. It's printed in hexadecimal notation.
This type does not have type specific options.

x86

Represents an x86 CPU instruction. It's printed in assembly.
The --x86-mode option lets you set the mode. You may use 16, 32 and 64 for 16-bit, 32-bit and 64-bit mode, respectively.
The --x86-syntax option defines the syntax for assembly. You may use either att or intel. By default intel is used.

ARM

An ARM A32/T32 or A64 CPU instruction.
The --arm-mode option lets you choose between a32, t32 and a64.
--arm-endianness lets you set the endianness. It can be little or big.

SPARC

A SPARC CPU instruction.
The --sparc-mode option lets you choose between 32, 64.
--arm-endianness lets you set the endianness. It can be little or big.

PowerPC

A PowerPC CPU instruction.
The --powerpc-mode option lets you choose between 32 and 64.
--powerpc-endianness lets you set the endianness. It can be little or big.

MIPS

A MIPS CPU instruction.
The --mips-mode option lets you choose between 32 and 64.
--mips-endianness lets you set the endianness. It can be little or big.