beautypg.com

Mul8s (multiply signed, 8 bit), Mul_8_16 (multiply, 8 bit to 16 bit), Muls_8_16 (multiply signed, 8 bit to 16 bit) – Echelon Neuron User Manual

Page 195

background image

_mul8s (Multiply Signed, 8 Bit)

This function multiplies two signed integers to produce an integer result.

Stack Transformation: (a, b -- a*b)
Location: Near
Registers Affected: R0

Example:
This example multiplies 50 times 40.

push #d’50 ; (d’50)

push #d’40 ; (d’40, d’50)

call _mul8s ; (d’208, 7)

_mul_8_16 (Multiply, 8 Bit to 16 Bit)

This function multiplies an 8-bit integer and a signed 16-bit integer to produce a

16-bit result.

Stack Transformation: (a, b(2) -- a*b(2))
Location: Near
Registers Affected: R0, P0, P3

Example:
This example multiplies 50 times 40.

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

push #d’40 ; (d’40, d’50, 0)

call _mul_8_16 ; (d’208, 7)

_muls_8_16 (Multiply Signed, 8 Bit to 16 Bit)

This function multiplies a signed 8-bit integer and a signed 16-bit integer to

produce a signed 16-bit result.

Stack Transformation: (a, b(2) -- a*b(2))
Location: Near
Registers Affected: R0, P0, P3

Example:
This example multiplies 50 times 40.

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

Neuron Assembly Language Reference

185