Hello again all,
Thanks very much to those who have helped me in the past! I appreciate it a lot.
I wanted to double check here. I am reading a couple of bytes from an external device. Each bit in the byte represents a configuration code. I wanted to get bit 5 to bit 0 of one byte, also get all 7 bits of another byte, and then combine them all into a 14 bit word.
I had the following in mind:
Does this look okay?Code:databyte1 VAR byte 'This variable contains bit 5 to bit 0 databyte2 VAR byte 'This variable contains all 7 bits of the config wordtoyou VAR word [..assuming that databyte1 and databyte2 already contain the read values..] databyte1 = databyte1 & %00111111 wordtoyou.byte1 = databyte1 wordtoyou.byte0 = databyte2 write 0, wordtoyou.byte0 wrte 1, wordtoyou.byte1
Thanks!
Bookmarks