98%(90)88 out of 90 people found this document helpful
This preview shows page 10 - 17 out of 24 pages.
n 4.Question :(TCO 5) Which of the following instructions use the Z flag?Question :(TCO 5) For the program below, give the number of iterations in the L1 loop.R0 EQU $1000-1132510636MultipleChoice17True0-1132510636MultipleChoice17-1132510635MultipleChoice20True0-1132510635MultipleChoice20
R1 EQU $1001I_COUNT EQU 150 J_COUNT EQU 100LDAA #I_COUNTSTAA R0L2 LDAA #J_COUNTSTAA R1L1 CLRANOPNOPDEC R1BNE L1DEC R0BNE L2H_1 BRA H_1Student Answer:150100450250Instructor Explanation:pages 110-112, Course TextbookPoints Received:0 of 3 Comments:Question 6.Question :(TCO 5) Write an assembly-language program to add four to each element of list1 and store it to the corresponding element of list2. Use aloop.ORG $2000LIST1 DC.B 1, 2, 3, 4, 5LIST2 DS.B 5Student Answer:org $8000 ldaa #$5 staa count lddx #list1 ldy #list2 back ldd 0,x -1132510628MultipleChoice30False0-1132510628MultipleChoice30
add %0100 std 0,y inx inx iny iny decb bne back Instructor Explanation:pages 107-110, Course TextbookORG$8000LDAB#$5LDX#LIST1LDY#LIST2THERELDAA0, XADDA#$4STAA0, YINXINYDECBBNETHERE1.Question :(TCO 8) In the HCS12, which of the following registers is used to make Port B output or input?Student Answer:Accumulator BPORTB
DDRADDRBInstructor Explanation:pages 138-140, Course TextbookPoints Received:3 of 3 Comments:Question 2.Question :(TCO 8) In HCS12, PORTA is __________ bit(s).Student Answer:16oneeight12Instructor Explanation:pages 138-140, Course TextbookPoints Received:3 of 3 Comments:Question 3.Question :(TCO 8) Which of the following will always make both bits, PB0 and PB7, HIGH?
Question :(TCO 8) The following program creates square wave pulses on PB0. What is the duty cycle?ORG$8000LDS#$4000 LDAA#$FFSTAADDRBBACKBSETPORTB,%00000001JSRDELAYBCLRPORTB,%00000001JSRDELAYBRABACK-1132385849MultipleChoice14True0-1132385849MultipleChoice14
Student Answer:75%66%50%25%Instructor Explanation:page 145, Course TextbookPoints Received:0 of 3 Comments:Question 5.Question :(TCO 8) In the following program, fill in the missing instruction to toggle all of the bits in the PORTA.LDAA#$FFSTAADDRAOVERLDAA#$55STAAPORTASTAAPORTABRAOVERStudent Answer:LDAA #$FFLDAA #$00-1132385848MultipleChoice24False0-1132385848MultipleChoice24
LDAA #$AALDAA #$55Instructor Explanation:pages 146-148, Course TextbookPoints Received:0 of 3 Comments:Question 6.Question :(TCO 8) There are eight switches connected to PORTC and eight LEDsconnected to PTJ. Write a program to monitor the switches continuously. Whenever the four leftmost switches are 1s, send $55 to PTJ.