Shop OBEX P1 Docs P2 Docs Learn Events
SXB & VB6 Xor — Parallax Forums

SXB & VB6 Xor

SXleeSXlee Posts: 47
edited 2011-08-29 08:27 in General Discussion
Hi All.
Trying Xor in SXB & VB6 but can not get the same results from the to, i.e:

VB6 = (15 Xor 00 = F )... SXB = (15 Xor 00 = 15)
VB6 = (15 Xor C1 = CE)... SXB = (15 Xor C1 = D4)
VB6 = (15 Xor 81 = 8E)... SXB = (15 Xor 81 = 94)
VB6 = (15 Xor 40 = 4F)... SXB = (15 Xor 40 = 55)
VB6 = (15 Xor 01 = E )... SXB = (15 Xor 01 = 14)
VB6 = (15 Xor C0 = CF)... SXB = (15 Xor C0 = D5)
VB6 = (15 Xor 80 = 8F)... SXB = (15 Xor 80 = 95)
VB6 = (15 Xor 41 = 4E)... SXB = (15 Xor 41 = 54)
VB6 = (15 Xor 01 = E )... SXB = (15 Xor 01 = 14)

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2011-08-29 06:46
    It looks like the "15" for VB6 is in decimal and the "15" for SXB is in hex.
  • SXleeSXlee Posts: 47
    edited 2011-08-29 07:11
    Thanks!
    I'll have look and a play, and get back to you.
  • SXleeSXlee Posts: 47
    edited 2011-08-29 08:12
    No, This is the vbCode
    Private Sub Form_Load()
    Text1 = Text1 & Hex(&HF Xor &H0) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &HC1) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H81) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H40) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H1) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &HC0) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H80) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H41) & vbNewLine
    Text1 = Text1 & Hex(&HF Xor &H1) & vbNewLine
    End Sub
    
    The result is:
    F
    CE
    8E
    4F
    E
    CF
    8F
    4E
    E
  • SXleeSXlee Posts: 47
    edited 2011-08-29 08:27
    Dave Hein wrote: »
    It looks like the "15" for VB6 is in decimal and the "15" for SXB is in hex.
    No the SXB is in decimal, and VB6 is in hex, so now I know what the problem is.
    Thank you!
Sign In or Register to comment.