Name:
get
Syntax:

GET location,variable,variable,WORD wordvariable...

Location - is a variable/constant specifying a scratchpad address. Valid values are:

0 to 127 for X1 parts
0 to 127 for 20X2 parts
0 to 1023 for all other X2 parts

Variable - is a byte variable where the data is returned. To use a word variable the keyword WORD must be used before the wordvariable name)

Description:

The function of the put/get commands is to store temporary byte data in the microcontrollers scratchpad memory.

This allows the general purpose variables (b0, b1 etc) to be re-used in calculations. Put and get have no effect on the scratchpad pointer and so the address next used by the indirect pointer (ptr) will not change during these commands.

When word variables are used (with the keyword WORD) the two bytes of the word are saved/retrieved in a little endian manner (ie low byte at address, high byte at address + 1)

Applies To:
20X2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:
    Share:
    Print:

    Read data from the scratchpad

    Read the byte value in location 1, and transfer it to b1, then transfer the data in locations 1 and 2 to w1

    Code Example:
    	get 1,b1	; get value of register 1 into variable b1
    	get 1, word w1
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.

    Comments

    • Login to leave a comment.