ECE243 Practice Question Website


Main Assembly Programming Input/Output Memory Computer Architecture Advanced Topics

Computer Architecture Questions





Question 6

Write a 68000 subroutine that sets a block of memory locations to zero where the size of the block (1 to 127) is in register d0 and the address of the block is in register a1. The register values can change in the subroutine.

Answer

Loop 	Moveq.b	#0,(a1)+
	dec.b 	d0
	bne 	Loop