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

Write an assembler program that will turn on and off the four leds on your proto

ID: 3812830 • Letter: W

Question

Write an assembler program that will turn on and off the four leds on your proto-board in an infinite loops sequentially. Do this sing the registers as we did in class. You will have to initialize three pins as outputs then turn on and off the LEDs in an infinite loop. The LEDs will be turning on an off faster than your eye can see. So practice with the debugger in codewarrior to single-step through your code. Practice using breakpoints and the continue feature.
Also send me the comments of assembly code

Explanation / Answer

CALL DELAY

MOV AL,BFH

MOV DX,PORTA
OUT DX,AL
MOV AL,BFH
MOV DX,PORTB
OUT DX,AL
MOV CL,15H
CALL DELAY
JMP TOP

MOV AL,FFH
MOV DX,PORTA
OUT DX,AL
MOV AL,AFH
MOV DX,PORTC
OUT DX,AL
MOV AL,EEH
MOV DX,PORTA
OUT DX,AL
MOV AL,EEH
MOV DX,PORTB
OUT DX,AL
MOV CL,02H
CALL DELAY

DELAY:
MOV BX,10H
D1:
MOV CX,0FFFFH
D2:
LOOP D2
DEC BX
JNZ D1
INT 03H
END START

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote