I don't understand the confusion.
X var byte
y var byte
z var bit
X = %01010101
Y = 3
Z = X.0[Y]
Z = 0
X is a variable, Y is a variable. Bit 3 of X is a '0'
Y = 4
Z = X.0[Y]
Z = 1
Bit 4 of X is 1
I don't understand the confusion.
X var byte
y var byte
z var bit
X = %01010101
Y = 3
Z = X.0[Y]
Z = 0
X is a variable, Y is a variable. Bit 3 of X is a '0'
Y = 4
Z = X.0[Y]
Z = 1
Bit 4 of X is 1
Charles Linquist
"No one is completely worthless. They can always serve as a bad example."
Anonymous
It depends on the position of the byte in memory, and is generally unpredictable. You can, however play some tricks with it.
If you assign vars like -
X var byte
Y var byte
Then PBP will assign the bytes to consecutive memory locations. In that case, bit 8 of X will be bit 0 of Y.
Charles Linquist
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks