Setbit, Clearbit Problem


chanchungfat

Recommended Posts

For some reason, I need to set and reset each bit of a variable and then transmit it. After a lot trial, I find that the setbit, clearbit function don't work. Here is my test code, it is very simple:

Global m

m = 0b00000011

clearbit(m, 1)

I use a variable box to observe the m, with or without line 3 (clearbit(m,1)), the box always shows "3".

Can you help me? Anything I overlooked?

Regards,

chanchungfat

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.