Probier mal einfach:
TWAR |= 0x50; ===> TWAR = 0x50;
wer weiss, was da vorher dringestanden hat


Und du brauchst im Main noch eine Dauerschleife ( While (1); )
sonst macht er ja flutsch und is weg