beautypg.com

Mul8l (multiply, 8 bit with 16 bit result), Mul8ls (multiply signed, 8 bit with 16 bit result), Not16 (not, 16 bit) – Echelon Neuron User Manual

Page 196

background image

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

call _muls_8_16 ; (d’208, 7)

_mul8l (Multiply, 8 Bit with 16 Bit Result)

This function multiplies two unsigned integers to produce a 16-bit result.

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

Example:
This example multiplies 50 times 40.

push #d’50 ; (d’50)

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

call _mul8l ; (d’208, 7)

_mul8ls (Multiply Signed, 8 Bit with 16 Bit Result)

This function multiplies two signed integers to produce a 16-bit signed result.

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

Example:
This example multiplies 50 times -40.

push #d’50 ; (d’50)

push #@lb(-d’40) ; (-d’40, d’50)

call _mul8ls ; (d’48, d’248)

_not16 (Not, 16 Bit)

This function returns the one’s complement (the bitwise NOT) of a 16-bit integer.

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

Example:
This example returns the one’s complement of 8.

186

System-Provided Functions