beautypg.com

Dealloc (deallocate and return) – Echelon Neuron User Manual

Page 92

background image

DEALLOC (Deallocate and Return)

The DEALLOC instruction deallocates a specified number of bytes from the data

stack, and performs a return from call operation. The DEALLOC instruction

uses the immediate addressing mode. The specified number of bytes must be in

the range 1 to 8.
Recommendation: Use the _dealloc system function to deallocate more than

eight bytes from the data stack. See _dealloc (Deallocate Stack Space and

Return) for more information.
See also ALLOC (Allocate) to allocate space on the data stack.
The DEALLOC instruction applies to Series 3100, 5000, and 6000 devices.

Syntax:
The DEALLOC instruction requires a single operand to specify the number of

bytes to allocate on the data stack:

DEALLOC #number

The value of number must be in the range 1..8 The number sign or hash (#) is

required to specify the immediate value.
Table 27 describes the attributes of the DEALLOC instruction.

Table 27. DEALLOC Instruction

Instruction

Hexadecimal

Opcode

Instruction

Size (Bytes)

CPU Cycles

Required

Affect on

Carry Flag

DEALLOC #1

7F

1

6

None

DEALLOC #2

7E

1

6

None

DEALLOC #3

7D

1

6

None

DEALLOC #4

7C

1

6

None

DEALLOC #5

7B

1

6

None

DEALLOC #6

7A

1

6

None

DEALLOC #7

79

1

6

None

DEALLOC #8

78

1

6

None


Example:
The following example allocates two bytes on the data stack as part of a function,

then at the end of the function, deallocates the two bytes from the data stack and

performs a return from call operation.

82

Neuron Assembly Language Instruction Statements