Put the mouse down and step away from the keyboard.
Sorry, not trying to be harsh and bag on ya, just pointing out I think you need to take a step back and get a better handle on the basics of C and assembly before you start leaping into this kind of stuff.
My advise would be as follows:
- spend a little time understanding what the assembly is doing that you pasted in. Meaning - ignore C for just a few and get a decent grasp on the syntax of the assembly you're dealing with. It will be CPU and assembler specific syntax (as is always the case when working in assembly) so you won't be able to look things up in a "generic" sense.
Depending on how savvy you are already with what you're working with, this may take a few hours. Refer to the docs for your part or assembler. specific doc in question will be something like "Assembler Reference Guide" or something like that. Basically gives the break down of all the assembly instructions and what their syntax looks like and means.
- next, pick up just about any C book and get a grip on the use of switch statements. This will actually be the easier of the tasks. Shouldn't take long at all. And yes, this one you could look up generically.
Also, realize that #define statements in C (especially when used in this fashion) is nothing more than an exact text replacement. Nothing magical about it. So in your code, where ever you made use of what appears in the left half of the "define" statement, replace that with what you put in the right half. At that point you should be able to look at your code and go - "what? Wait.....that doesn't look right".
Final note: accessing individual bits in C can actually be a bit of a PITA. Not super hard, but tedious. Good news is a lot of the cross compilers for microcontrollers on the market today realize this and realize that in a microcontroller you're likely to be doing bit accesses a LOT. So, they help out by providing built in - non standard or ANSI C - constructs that make the job a whole lot easier so take a look at the C language reference manual for your cross compiler as well.
Lots of digging I know, but you'll learn a helluva lot more and understand it better than just getting the short answer of how it's supposed to be done here. (I know, I'm a hardass a-hole.......just ask my kids)