[Implemented] XOR

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] XOR

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

So i heared (or just a rumour ?)
that AND,NOR and OR will included in next upcoming versions.
What about XOR , XAND ?
In my vlink i will include encyption, using the XOR operator
like

G=P XOR T

or must i use inline asm ?
or are there other (undocumented) solutions ?


Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

is this questions too lame to answer ?

Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

XOR will be added for 2.90. For now, you can use this Procedure (not tested but should work). InlineASM compile option must be ON.

Procedure XOR(a,b)
MOV eax,a
XOR eax,b
MOV a,eax
ProcedureReturn a
EndProcedure

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

thanx for the first time, it compiles without any errors.


Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

and works fine in the readymade exe.

Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Nice..

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
Procedure XOR(a,b)
MOV eax,a
XOR eax,b
MOV a,eax
ProcedureReturn a
EndProcedure
Hi Fred, I have some source code that looks like this:

Code: Select all

WindowLong Xor WS_EX_APPWINDOW
How would I pass this to your XOR procedure?


PB - Registered PureBasic Coder
Post Reply