#include<reg51.h>
sfr port= 0x80; void main() { port=~port; }
This code was successfully compiled...but yu expect the port pins are complemented only once..But what i experiened when used with a simulator software, was the port pins get complemented for infinite times( somthing like the 'port=~port;' instruction was put in a while(1) loop..)
What could be the wrong?
Think about what happens when f gets bigger than an int...
And if you post any more code, put the proper "pre" tags around it so we can read it easier.