Forgot that b3 was DIMed
**Encrypt
FOR i = 0 TO 16383 STEP 8
_MEMGET m1, m1.OFFSET + i, b1
_MEMGET m2, m2.OFFSET + i, b2
b3 = b1 XOR b2
_MEMPUT m2, m2.OFFSET + i, b3
NEXT
**Decrypt
FOR i = 0 TO 16383 STEP 8
_MEMGET m1, m1.OFFSET + i, b1
_MEMGET m2, m2.OFFSET + i, b2
b3 = b1 XOR b2
_MEMPUT m2, m2.OFFSET + i, b3
NEXT
****
OK there might be a faster way. In assembler you can do
****in general
mov si, offset string1
mov di, offset string2
mov eax, [si + bx]
XOR [di + bx], eax
**etc
4 bytes at a time from string1 XORed with same 4 bytes in string2
there are op code for 8 bytes too:
https://www.felixcloutier.com/x86/xorTo make that look QB-ish
_MEMGET m1, m1.OFFSET + i, b1
_XORPUT m2, m2.OFFSET + i, b1 ' 8bytes at a time