Write an Assembly coding file with the series of instruction in this question. Use the external 8-pin switches to determ

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write an Assembly coding file with the series of instruction in this question. Use the external 8-pin switches to determ

Post by answerhappygod »

Write an Assembly coding file with the series of instruction in
this question.
Use the external 8-pin switches to determine a 2-digit
hexadecimal number and show each digit on the 7-segment
display.
***Note: The coding language is Assembly and the board is the
DE10-NANO:
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 1
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 1 (54.97 KiB) Viewed 36 times
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 2
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 2 (74.88 KiB) Viewed 36 times
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 3
Write An Assembly Coding File With The Series Of Instruction In This Question Use The External 8 Pin Switches To Determ 3 (167.22 KiB) Viewed 36 times
Please use proper assembly language for the file.
Vb a 100 100 са 2345678 Я

LOOP: Load JP1/JP7; Load LED; Load LOOKUP Change Directions for JP1/JP7 while is used as output Load values from DIP switches (JP1/JP7) to register Use MASKS to obtain right 4 bits and left 4 bits LDR R2,=JP1_BASE LDR R5,=0xFFFFFFFF STR R5, [R2, #4] The same as Lab 2, left 4 bits need to be logic shifting Find the corresponding value of your LOOKUP for the first 7-segment, then load it to a register Do the same step for the second 7-segment Combine the first and second 8 bits together, and store it to the JP1/JP7 (as output) See next page Hint: LSL, ADD 0123456789 A62366

For instance, assume I get a 4-bit value which is R8 = 0b00001001, it is R8 = 9 in decimal. Suppose I have already loaded all LOOKUP into the register R4, so it may be stored from 0x0000000c as an example. What we need to transfer Ob00001001 (9) to the 7- segment display form which should be Ob01101111 (111 in decimal) and output this value to the JP7 which connect to the 7-segment displays. • Let's say: 0023456789 A62366 LOOPUP: .word Ob00111111, Ob00110000, 0b01101101, Ob01111001 // 0, 1, 2, 3 .word Ob01110010, 0b01011011, 0b01011111, Ob00110001 // 4, 5, 6, 7 Ob01111111, Ob01111011, Ob01110111, 0b01011110 // 8, 9, A, B Ob01001100, Ob01111100, Ob01001111, Ob01000111 // C, D, E, F .word 63, 6, 91, 79, 102, 109, 125, 7, 127, 111, 119, 124, 88, 94, 121, 113 //decimal So, in fact, we want to get the value of 111 from the LOOKUP. .word .word Number on 7-seg: 0 1 2 3 5 6 7 8 9 Memory address: 0x0000000c 0x00000010 0x00000014 0x00000018 0x00000010 0x00000020 0x00000024 0x00000028 0x0000002c 0x00000030 0x00000034.... 119... Values are stored: 63 6 91 79 102 109 125 7 127 111
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply