Hey guys, I am working on a project where I need to copy a SINT into an INT. I have a String that the operator inputs from the HMI. We'll call this My_String. So I have My_String.LEN = 4 and I am using a COP instruction to move My_String.Data[0] into My_Ints[0] with a length of 2. It works but it is backwards. I understand that I can use the SWPB instruction and move it to another Int to rearrange it. What I am wondering is why it gets reversed in the first place. Are bits 0-7 in the INT the high word and 8-15 the low word?
My_String[0] = 'A' which is moved to bits 0 - 7
My_String[1] = 'B' which is moved to bits 8 - 15
So why does it show up BA?
My_String[0] = 'A' which is moved to bits 0 - 7
My_String[1] = 'B' which is moved to bits 8 - 15
So why does it show up BA?