{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 6 - values that are different from what you found...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ELEC 2220 Computer Systems Homework #6 Due: Monday, 6-7-2010 1. Study section 4.6 of the book (memory addressing modes.) 2. Given the CPU12 program below, sketch a diagram of the data memory, beginning at address $0800. As in the previous homework, label each byte of memory with its address, indicate which byte of memory corresponds to each symbolic label, and enter the value of each byte. Use hexadecimal form for each number. 3. Determine the values loaded into the indicated registers by the following CPU instructions, and enter those on the lines to the right of the instructions. 4. Create a CodeWarrior project, enter the program below, assemble it, and single- step through the program in the debugger to check your answers. Next to your answers, record the register values observed in the debugger, and comment on any
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: values that are different from what you found in part 3. ; Data memory definition org $0800 pp: dc.w $2345 ir: dc.b 5,6,7,8 ts: dc.w $0805 fr: dc.b ‘A’ reg: dc.w 18,-20,15,-10 mem: ds.b $20 tmp: dc.w $1234,$5678 ; Test program org $4000 ;Register contents after instruction: Entry: ldaa #10 ;A =_______________ ldaa $803 ;A =_______________ ldaa pp ;A =_______________ ldaa ir+2 ;A =_______________ ldaa $80D ;A =_______________ ldaa fr ;A =_______________ ldx $080B ;X =_______________ ldx ts ;X =_______________ ldaa 0,x ;A =_______________ ldaa 5,x ;A =_______________ ldaa -5,x ;A =_______________ ldx #$0800 ;X =_______________ ldaa $31,x ;A =_______________ bra * ;Effectively “halts” the program...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online