Quiz1a+_S - 0306-250-01 1 problem, 1 page Assembly Language...

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0306-250-01 1 problem, 1 page Assembly Language Programming Quiz One Bonus Solution Fall 2009 October 2, 2009 Given the DC and DS assembler directives in the leftmost column below, complete the initial memory map. Then, given the initial contents of X and D, for each instruction to the right, indicate any changes that occur in memory, X, and D. Indicate all contents in hex with enough digits to show every bit. Also, indicate the contents of the CCR after the last instruction. If the contents for a location are not known, write “—.” MyConst: Data1 Data2 MyData: Result1 Result2 SECTION ;$C0F8 DC.B 2,%100,254,$20 DC.W $E001,2 SECTION DS.W 2 DS.B 4 $1100 — $1105 $02 $C0F9 $04 $C0FA $FE $C0FB $20 $C0FC $E0 $C0FD $01 $C0FE $00 $C0FF Data1 — $C0F8 addd — $1107 Data2 — $1106 ldd — $1104 Result2 — $1103 staa — $1102 1,-x — $1101 ldab $02 $AB X $C0FF $C0FE D $ABCD $AB00 $E001 $E205 CCR: N: 1 Z: 0 V: 0 C: 0 0306-250-01 1 problem, 1 page Assembly Language Programming Quiz One Bonus Solution Fall 2009 October 2, 2009 Given the DC and DS assembler directives in the leftmost column below, complete the initial memory map. Then, given the initial contents of X and D, for each instruction to the right, indicate any changes that occur in memory, X, and D. Indicate all contents in hex with enough digits to show every bit. Also, indicate the contents of the CCR after the last instruction. If the contents for a location are not known, write “—.” MyConst: Data1 Data2 MyData: Result1 Result2 SECTION ;$C0F8 DC.B 9,%100,255,$20 DC.W $01E0,2 SECTION DS.W 2 DS.B 4 $1100 — $C0F8 $09 $C0F9 $04 $C0FA $FF $C0FB $20 $C0FC $01 $C0FD $E0 $C0FE $00 $C0FF Data2 — $1107 addd — $1106 Data1 — $1105 ldd — $1104 Result1 — $1103 stab — $1102 1,-x — $1101 ldaa $CD $02 X $C0FB $C0FA D $ABCD $FFCD $0904 $0AE4 CCR: N: 0 Z: 0 V: 0 C: 0 0306-250-01 1 problem, 1 page Assembly Language Programming Quiz One Bonus Solution Fall 2009 October 2, 2009 Given the DC and DS assembler directives in the leftmost column below, complete the initial memory map. Then, given the initial contents of X and D, for each instruction to the right, indicate any changes that occur in memory, X, and D. Indicate all contents in hex with enough digits to show every bit. Also, indicate the contents of the CCR after the last instruction. If the contents for a location are not known, write “—.” MyConst: Data1 Data2 MyData: Result1 Result2 SECTION ;$C0F8 DC.B 9,%100,$40,254 DC.W $E201,2 SECTION DS.W 2 DS.B 4 $1100 — $C0F8 $09 $C0F9 $04 $C0FA $40 $C0FB $FE $C0FC $E2 $C0FD $01 $C0FE $00 $C0FF Data2 — $1107 addd — $1106 Data1 — $1105 ldd — $1104 Result1 — $1103 staa — $1102 1,-x — $1101 ldab $AB $02 X $C0FE $C0FD D $ABCD $AB01 $0904 $EB05 CCR: N: 1 Z: 0 V: 0 C: 0 ...
View Full Document

Ask a homework question - tutors are online