sbit OV = PSW^2
^ here is just XOR(ref) operator right? Not overloading or something.
How could I get sbit with the XOR operator?
sbit OV = PSW^2
^ here is just XOR(ref) operator right? Not overloading or something.
How could I get sbit with the XOR operator?
Copyright © 2021 Jogjafile Inc.
You shouldn't ask a question about
C51and then reference a document from theA51manual, they are different things (although they do share similarities as well).In your statement, the
^is NOT thexoroperator:In the definitiopn of
sbitin the C51 manual, they explain that the character^is used to denote the bit position in the byte address of the SFR.This syntax is only valid for Declaration code lines.
If used inside the program, then the
^operator is the standard bitwisexoroperator from the standardClanguage (not specific toC51).