def animation_to_asm(animation):
	"""
	Serialize animation to assembly.
	"""
	serialized = '{}:\n'.format(animation.name)
	frame_num = 1
	for frame in animation.frames:
		serialized += '; Frame {}\n'.format(frame_num)
		serialized += frame.serialize()
		frame_num += 1
	serialized += '; End of animation\n'
	serialized += 'ANIM_ANIMATION_END\n'
	serialized += '#print {}\n'.format(animation.name)
	return serialized