lowbyte/highbyte -> word


Closed Thread
Results 1 to 4 of 4
  1. #1
    brodin's Avatar
    brodin Guest

    Default lowbyte/highbyte -> word

    if i use the highbyte and lowbyte like this:

    a VAR BYTE
    b VAR BYTE
    c VAR WORD
    d VAR WORD

    c = 15334

    a = c.lowbyte
    b = c.highbyte

    d = ?


    Then i want to get the word back from A and B into D.
    How do i do that?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I would have thought half the folks reading this thread would have replied... just reverse what you've already done... using your example...

    d.lowbyte=a
    d.highbyte=b

    Using your example d would now equal 15334.

    Melanie

  3. #3
    brodin's Avatar
    brodin Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    Thanks for the answer!

  4. #4
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    thxs Melanie it was usefull to me

Similar Threads

  1. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  2. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  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