|
|
Subject:
XORing bytes in NSBasic-CE
Category: Computers > Programming Asked by: gummerson-ga List Price: $100.00 |
Posted:
05 Jul 2004 18:57 PDT
Expires: 13 Jul 2004 21:39 PDT Question ID: 370098 |
I have written an application in NSBasic for Palm which communicates with a proprietry device using RS232. I need to port this to an IPAQ and have purchased NSBasic-CE. My problem is that there is no function to handle XORing of bytes to calculate the BCC in the data strings, and NSBasic does not appear to have such a library (there was one for the Palm version). Is there a library available for this task, or BASIC code to do the job, or another suggestion? | |
| |
| |
| |
|
|
There is no answer at this time. |
|
Subject:
Re: XORing bytes in NSBasic-CE
From: crythias-ga on 05 Jul 2004 21:59 PDT |
According to MATHWORLD http://mathworld.wolfram.com/XOR.html A XOR B = (A AND NOT B) OR (NOT A AND B) or A XOR B = (A OR B) AND (NOT A OR NOT B) But, this is an interesting quote: http://www.nsbasic.com/palm/info/technotes/TN03.htm 3. Checksum The NMEA 0183 Standard allows for an optional checksum. The checksum is preceded by the asterisk (*) character placed after the last data field. It is a two-character field equal to the hex value obtained by XOR'ing all the character bytes of the sentence. This is impossible to calculate (at least in any straightforward manner) in NSBasic. I've had to do a lot of error checking and validation of data as a workaround. George Henne says that bit manipulation is also in the works. -=-=-=- I don't know for sure if the statement is accurate based upon the information I've given you above, and I don't have NSBasic, so I don't know if it will work for you. I am not a Google Answers Researcher. Google Search: xor nsbasic xor |
Subject:
Re: XORing bytes in NSBasic-CE
From: crythias-ga on 08 Jul 2004 18:15 PDT |
gummerson-ga, Is there no possibility that using the AND/NOT/OR formulas above will obtain your result, or do you not have those functions as well? |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |