ECE243 Practice Question Website


Main Assembly Programming Input/Output Memory Computer Architecture Advanced Topics

Assembly Programming Questions





Question 29

	COUNT 	equ 	10
	TUTOR 	equ 	228
	PROGRAM	equ 	$1000
		org 	PROGRAM
		move.w 	#0,d0		;Point A
		move.w 	#COUNT,d1
	LOOP 	subq 	#1,d1
		addq 	#1,d0
		tst 	d1
		bne 	LOOP
		move.w 	d0,RESULT
		move.w 	#TUTOR,d7
		trap 	#15
	RESULT 	ds.w 	1
		end
	
What are the contents of memory location RESULT after execution of this program segment?

Answer

$0A (or 10)