beautypg.com

Less16 (less than, 16 bit), Less16s (less than signed, 16 bit), Less8 (less than, 8 bit) – Echelon Neuron User Manual

Page 184

background image

Location: Near
Registers Affected: P0 is modified and contains address(2)

Example:
This example loads two bytes from address h’f000, which for this example is

assumed to contain h’05 at h’f000 and h’01 at h’f001.

pushd #h’f000 ; (h’00, h’f0)

call _ldP0_fetchl ; (h’01, h’05)

_less16 (Less Than, 16 Bit)

This function returns a < b, where a and b are unsigned 16-bit numbers.

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

Example:
This example determines if d’10 < d’20.

pushd #d’20 ; (d’20, 0)

pushd #d’10 ; (d’10, 0, d’20, 0)

call _less16 ; (1)

_less16s (Less Than 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)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 _less16s ; (0)

_less8 (Less Than, 8 Bit)

This function returns a < b, where a and b are unsigned.

174

System-Provided Functions