beautypg.com

Echelon Neuron User Manual

Page 176

background image

call _drop_n ; ()

_drop_n_preserve_1 (Drop N Bytes from Stack

and Preserve NEXT)

This function preserves NEXT and removes the next N items from the stack.

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

Example:
This example drops 3 bytes from the stack and returns a.

pushs #d’3 ; (3, a, b, c, d)

call _drop_n_preserve_1 ; (a)

_drop_n_preserve_2 (Drop N Bytes from Stack

and Preserve NEXT and NEXT+1)

This function preserves two bytes from the stack (in NEXT and the element

following NEXT) and removes the next N items from the stack.

Stack Transformation: (N, a, b, c(N) – a, b)
Location: Near
Registers Affected: None

Example:
This example drops 3 bytes from the stack and returns a, b.

pushs #d’3 ; (3, a, b, c, d, e)

call _drop_n_preserve_2 ; (a, b)

_drop_n_return_1 (Drop N Bytes from Stack,

Preserve NEXT, and Return)

This function preserves NEXT, removes the next N items from the stack and

returns to the caller of the caller of this function.

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

166

System-Provided Functions