Question: Consider the attached code sample.asm which displays numbers 1, 2, 3 and 4 sequentially on the 4- segment displays, using the Edsim51 tool. sample.asm For


Consider the attached code sample.asm which displays numbers 1, 2, 3 and 4 sequentially on the 4- segment displays, using the Edsim51 tool. sample.asm For example, the displays look as follows at sequential times: 6.888 3141818 888.8.818181C! Modify the assembly code so that instead letters A, B, C and D are displayed in an infinite loop, as shown below: 8.888 8.8.8.8 8.8.28 8888. Remember to adjust the Update Freq. to 100 so that the numbers can be observed as they change when the delay is included. Make sure to include your name, and date in the code comments. Also provide comments next to some of the lines or above them. Name the code prog_2.asm and upload it to the Canvas assignments. ; enable display 3 ; put pattern for 1 on display ; enable display 2 ; put pattern for 2 on display start: SETB P3.3 SETB P3.4 MOV P1, #11111001B CALL delay CLR P3.3 MOV P1, #10100100B CALL delay CLR P3.4 SETB P3.3 MOV P1, #10110000B CALL delay CLR P3.3 MOV P1, #10011001B CALL delay JMP start i enable display 1 ; put pattern for 3 on display ; enable display o ; put pattern for 4 on display ; jump back to start ; a crude delay delay: MOV RO, #200 DJNZ RO, $ RET
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
