Searching \ for '[SX] Explain WDATA and READINC statements ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/lib/mem/index.htm?key=data
Search entire site for: 'Explain WDATA and READINC statements ?'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Explain WDATA and READINC statements ?'
2007\03\15@051133 by tdg8934n/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote:

Can someone better explain WDATA statements and how they are used. I understand that they have to be incremented by 2 but need info why this is so (2 bytes?). I am using an SX52 and using (2) 16 bit port RBC and RDE as PIN outputs.

Also I can't find any information on READINC statements. Is this a valid statement and how does it differ from a READ statement?

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=178163
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\03\15@052650 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Yep you are correct, WDATA elements are 2 bytes long.

WDATA is used to create data elements that are WORDs, each word element takes two bytes. The regular DATA statement will automatically create WORD elements only if the value is > 255. This causes problems when some of the values are < 256. WDATA will always use 2 bytes even if the value is < 256.

READINC works like READ but will automatically increaments the pointer variable so you can read the next element in the data table.

cnt = 0
READINC myData + cnt, wordvar
' Now cnt is 2
Bean
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=178163#m178165
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\03\15@054026 by tdg8934n/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote:

Bean,
I just found a brief sentence on the READINC in the WhatsnewAll doc under in the Beta testers section. I also saw that Jon Williams used it in the March Issue of N&V for his CGoL program.

What's New In SX/B 1.51.01
----------------------------------------------------------------------
New Command:

 READINC
   Exactly the same syntax as READ, but also automatically increments the offset variable to point to the next item in the DATA list.


This information needs to be in a help file with "example" code. I understand this is in the works but it would be nice to have this available in the HELP file everytime SX code is officially released.  
I will be patient and do appreciate your very knowledgable help and others like JonnyMac.  
Thanks again!

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=178163#m178168
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\03\15@054409 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

I agree the help file needs updating, but it will probably wait until the next version is released.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=178163#m178170
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...