Some more effort on your part is called for. You may not get any more code than the snippet pootworm contributed. Code-on-demand is not the purpose of these forums.

We will help, but you need to actually do the work. If you have the traffic light control function in assembler, then duplicating it in C sounds a bit busy. Is there some problem with the assembler code? We might be able to help with that.