Zigbee-Stack is a project mainly written in C and ASSEMBLY, it's free.
My attempt at the zigbee stack