Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a program to turn LED4 and LED1 on, then LED2 and LED3 must be turned off.

ID: 3546986 • Letter: W

Question

write a program to turn LED4 and LED1 on, then LED2 and LED3 must be turned off.

a. please paste the sourse code

b. Single step the code. After executing the line that sends the pattern to PTT, cut and paste the Memory Window showing the value of PTT. The Memory Address of PTT is $270. Right-click on Memory Window and select address. Type 270 in the address field


then


1.     Write a program to continuously turn all four green LEDs ON and OFF (toggle). There should be a one-second delay between each toggle.

A.    Cut and paste the source code.

B.    Show the delay calculation.

C.    Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs.

2.     Write a program that displays values from 0 to 15 sequentially, with a 0.75-second delay in between each display. After the count value reaches 15 (i.e. all LEDs are ON), the program should stop.

A.    Cut and paste the code.

B.    Show the delay calculation.

C.    Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs.

Explanation / Answer

ABSENTRY Entry                 ; Application entry point

           INCLUDE 'derivative.inc'

            ORG               $2000

           ; Data is defined HERE

           ORG                            $C000

Entry:

_Startup:

                        

           LDAA              #$FF

           STAA               DDRT               ; Define Port T as an output   

         

           LDAA              #$50

           STAA               PTT                 ; Turns LED4 and LED2 ON         

Back    BRA               Back                ; End of main

              

            ORG             $FFFE

            DC.W             Entry               ; Reset Vector