SUBD/SUBX Commands

Subtracts one number from another. Use SUBD to subtract one decimal number from another; use SUBX to subtract one hexadecimal number from another.

Format

SUBD n m

SUBX n m

Parameter(s)

n

Number from which m is subtracted.

m

Number to be subtracted.

Description

Precede negative decimal numbers with a minus sign. Hexadecimal numbers are negative in the range X’FFFFFFFFFFFF (-1) to X’800000000001 (-140,737,488,355,327).

Subtracting Decimal Numbers

The following example subtracts 134 from 34:

>SUBD 34 134

       -100

Subtracting Hexadecimal Numbers

The following example subtracts hexadecimal 3 from 22:

>SUBX 22 3

      1F