You could compile a working C example and take a look at the resulting assembler code to get a clue.