I am a new user so I am probably doing something dumb.
After debugging my program the problem is the following:
let bit0 = 1 ' sets bit7 and bit15 the first time
let bit0 = 1 ' sets bit0 anf bit8 the second time, bits7 and bit15 stay set
let bit1 = 1 ' sets bit6 and bit14
let bit1...