Hello everybody,
I have seen the operator %= used in a code meant for Keil C. Can somebody explain me its purpose? Thanks.
www.8051projects.net/.../forum_viewtopic.php
char getchar() { volatile char c; while(RxInChar == RxOutChar); ES = 0; /* Disable Interrupts */ c = RxBuffer[ RxOutChar++ ]; RxOutChar %= BUF_SIZE; ES = 1; /* Enable Interrupts */ return( c ); }
I am new to C C51 is just about the lousiest platform there is to learn C on.
Get a "teach yourself C" book (I recommend Kochan: "programming in ANSI C") and a (free) PC C compiler and start learning.
Make sure you get a C book, not a C++ book if you want to move forward with the '51
Erik