beautypg.com

L_shift16 (left shift, 16 bit), L_shift16s (left shift signed, 16 bit), L_shift8 (left shift, 8 bit) – Echelon Neuron User Manual

Page 182

background image

This example acquires the semaphore, then modifies a global variable, then

releases the semaphore.

import io_iaccess, io_irelease

...

; ( data -- )

callf io_iaccess

; ( data -- )

pop globalVar

; ( -- )

callf io_irelease

; ( -- )

_l_shift16 (Left Shift, 16 Bit)

This function shifts an unsigned 16-bit integer left. b must be in the range 0..7.

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

Example:
This example shifts 16 left 2.

pushs #d’2 ; (d’2)

pushd #d’16 ; (d’16, 0, d’2)

call _l_shift16 ; (d’64, 0)

_l_shift16s (Left Shift Signed, 16 Bit)

This function shifts a signed 16-bit integer left. b must be in the range 0..7.

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

Example:
This example shifts 16 left 2.

pushs #d’2 ; (d’2)

pushd #d’16 ; (d’16, 0, d’2)

call _l_shift16s ; (d’64, 0)

_l_shift8 (Left Shift, 8 Bit)

This function shifts an unsigned integer left. b must be in the range 0..7.

Stack Transformation: (a, b -- a<Location: Near

172

System-Provided Functions