<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assemble_rom_code(self, asm):
 		""" 			assemble the given code and program the ROM 		"""

		stream = StringIO(asm)
		worker = assembler.Assembler(self.processor, stream)
		try:
			result = worker.assemble()
		except BaseException as e:
			return e, None
		self.rom.program(result)
		return None, result