beautypg.com

Equal8 (equality test, 8 bit), Gequ16s (greater than or equal signed, 16 bit), Gequ8 (greater than or equal, 8 bit) – Echelon Neuron User Manual

Page 178

background image

call _equal16 ; (0)

_equal8 (Equality Test, 8 Bit)

This function returns true if two 8-bit values are equal. The native XOR

instruction can also be used to determine equality between two 8-bit scalars, and

can be more efficient than the _equal8 system function. Note that XOR replies

with inverse Boolean logic (zero for equality and non-zero for non-equality), while

_equal8 provides positive and simplified logic (1 for equality, 0 for non-equality).

Stack Transformation: (a, b -- a == b)
Location: Near
Registers Affected: None

Example:
This example determines if h’12 == h’21.

push #h’12 ; (h’12)

push #h’21 ; (h,21, h’12)

call _equal8 ; (0)

_gequ16s (Greater Than or Equal Signed, 16 Bit)

This function returns a >= b, where a and b are signed 16-bit numbers.

Stack Transformation: (a(2), b(2) -- a(2)>=b(2))
Location: Near
Registers Affected: None

Example:
This example determines if d’10 >= -d’10.

pushd #-d’10 ; (-d’10, -d’1)

pushd #d’10 ; (d’10, 0, -d’10, -d’1)

call _gequ16s ; (1)

_gequ8 (Greater Than or Equal, 8 Bit)

This function returns a >= b.

Stack Transformation: (a, b -- a>=b)
Location: Near
Registers Affected: None

168

System-Provided Functions