ECET 330 Week 3 Quiz

Published on January 2018 | Categories: Finance | Downloads: 103 | Comments: 0 | Views: 737
of 1
Download PDF   Embed   Report

1. (TCO 5) In the following program, what is the largest number that Register B can take? L1 CLRA NOP NOP DECB BNE L1 2. (TCO 5) If we need a loop of 20,000 iterations, then we must use ________location(s) of RAM for counter. 3. (TCO 5) Upon execution of JSR instruction, SP _________. 4. (TCO 5) The JMP is ________-byte instruction 5. (TCO 5) For the program below, give the number of iterations in the loop. R0 EQU $1000 R1 EQU $1001 I_COUNT EQU 200 J_COUNT EQU 250 LDAA #I_COUNT STAA R0 L2 LDAA #J_COUNT STAA R1 L1 CLRA NOP NOP DEC R1 BNE L1 DEC R0 BNE L2 H_1 BRA H_1 6. (TCO 5) Write an assembly-language program to subtract $40 from each element of list1 and store it to the corresponding element of list2. Use a loop. ORG $2000 LIST1 DC.W $211, $442, $311, $421, $521 LIST2 DS.W 5

Comments

Content

1. (TCO 5) In the following program, what is the largest number that Register B can take? L1 CLRA NOP NOP DECB BNE L1 2. (TCO 5) If we need a loop of 20,000 iterations, then we must use ________location(s) of RAM for counter. 3. (TCO 5) Upon execution of JSR instruction, SP _________. 4. (TCO 5) The JMP is ________-byte instruction 5. (TCO 5) For the program below, give the number of iterations in the loop. R0 EQU $1000 R1 EQU $1001 I_COUNT EQU 200 J_COUNT EQU 250 LDAA #I_COUNT STAA R0 L2 LDAA #J_COUNT STAA R1 L1 CLRA NOP NOP DEC R1 BNE L1 DEC R0 BNE L2 H_1 BRA H_1 6. (TCO 5) Write an assembly-language program to subtract $40 from each element of list1 and store it to the corresponding element of list2. Use a loop. ORG $2000 LIST1 DC.W $211, $442, $311, $421, $521 LIST2 DS.W 5

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close