beautypg.com

R_shift8s (right shift signed, 8 bit), Register_call (call function from register) – Echelon Neuron User Manual

Page 202

background image


Stack Transformation: (a -- a>>n)
Location: Near
Registers Affected: None

Example:
This example shifts 16 right 3.

push #d’16 ; (d’16)

call _r_shift8_3 ; (d’2)

_r_shift8s (Right Shift Signed, 8 Bit)

This function shifts a signed integer right. b must be in the range 0..7.

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

Example:
This example shifts -16 right 2.

pushs #d’2 ; (d’2)

push #@lb(-d’16) ; (-d’16, d’2)

call _r_shift8s ; (-d’4)

_register_call (Call Function from Register)

This function calls a function through a pointer. The supplied address must be

one less than the address to be called.

Stack Transformation: (address(2)-1 --)
Location: Near
Registers Affected: None (not including whatever is done by the called function)

Example:
This example invokes a function at address h’f423 (by specifying h’f422).

pushd #h’f422 ; (h’f422)

call _register_call ; ()

192

System-Provided Functions