add function to emit assembly code