Write in separate assembly, fixes #11