Inverting a Word & Assigning Array To Bytes


Closed Thread
Results 1 to 5 of 5
  1. #1

    Question Inverting a Word & Assigning Array To Bytes

    Is there another way of doing these commands?

    Code:
        raw_temp.Byte0 = dq[0]
        raw_temp.Byte1 = dq[1]
    
        raw_temp.Byte0 = raw_temp.Byte0 ^ 255
        raw_temp.Byte1 = raw_temp.Byte1 ^ 255

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Code:
    @dqWord = dq
    dqWord  VAR WORD EXT
    
    raw_temp = ~dqWord
    DT

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hmmm,

    No Comments ??

    No Questions ??
    <br>
    DT

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    ...............
    Last edited by mister_e; - 25th August 2005 at 23:45.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I guess it's another case where CTRL+C, CTRL+V apply

    No why, just because !!!

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=444&stc=1">
    Attached Images Attached Images  
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  4. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  5. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15:23

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts