I have read the commands document, but there wasn't any note on how to create a list in ICE.
If you have ICE v1.5:
{1,2,3,4,5->L1, and then you grab elements with L1(5) etc. However, it seems to be partially broken, so if it works, you have luck. I won't update or fix it.
If you have ICE v2.0:
Data(3,1,2,3,4,5)->A returns a pointer and stores it in A, or use DataCopy(L1,3,1,2,3,4,5) to copy it directly. The first 3 is here the size of all the elements.
{1,2,3,4,5->L1, and then you grab elements with L1(5) etc. However, it seems to be partially broken, so if it works, you have luck. I won't update or fix it.
If you have ICE v2.0:
Data(3,1,2,3,4,5)->A returns a pointer and stores it in A, or use DataCopy(L1,3,1,2,3,4,5) to copy it directly. The first 3 is here the size of all the elements.
Nate44 wrote:
I have read the commands document, but there wasn't any note on how to create a list in ICE.
If you're using ICE v2
You have to use the new DataCopy() command.
As of typing this it's not in the documentation but PT_ is adding it as I type.
The syntax is " DataCopy(Destination,DataSize,data1,data2,...)"
Destination is where you want that data put, such as L1, L2, or you can use memory pointers.
DataSize is how big each entry in the data is, use 3 for 3-byte lists.
data1,data2,etc is the actual numbers you want to be stored into the destination.
To retrieve data from a list in ICE v2, use L1(0) to get the first entry. L1(3) to get the second entry, L1(6) for the third.
You have to use positive multiples of 3 to retrieve data from a list, because each data entry is 3 bytes large.
If you use "2" in the DataSize argument of the DataCopy() command, then you use multiples of 2 to retrieve data from the list.
The maximum number sizes are:
16777215 for 3-byte entries
65535 for 2-byte entries
255 for 1-byte entries
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement