Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab Code Check the following two assembly programs, try to understand each command line, and add comments after each command line, Program 1: this program
Lab Code Check the following two assembly programs, try to understand each command line, and add comments after each command line, Program 1: this program is to display numbers on 7-segment displays using ports ; B and P. PTP DDRP pti EQU EQU equ $0258 $025A $0268 ddri equ $026A PTB DDRB $01 EQU EQU $03 org movb $1500 #$FF, DDRB movb # $3F, DDRP movb #SFF, ddri forever loopi 1dx movb #Displab movb #SFF, ptj 1, x+, PTB movb1, X+, PTP jsr #DispTab+8 bne loopi forever delay cpx bra Displab dc.b $30, 90e dc.b $5B, $od dc.b $4F, SOb dc.b $66, 907 delay #3 out_loop ldy #2000 inner_loop psha ldab pula dbne end y, inner_loop done b, out_loop rts This program is to shift a number on the 7-segment displays by ; changing the time delay. Check the time delay subroutine carefully ETE DDRP EQU EQU $0258 $025A pti equ $268 ddri equ $26A $01 PTB DDRE EQU EQU $03 org $1500 movb #SFF, DDRB movb #$3F, DDRP movb #SFF, ddri forever loopi ldx #DispTab movb #SFF, pti movb 1,x+, PTB movb 1, x+, PTP jsr delay cpx #DispTab+8 bne loopi bra forever Displab dc.b $3f; $0e dc.b $3f, $od dc.b $3f, $ Ob dc.b $3f, $07 #50 delay out_loop #20000 inner loop psha ldab ldy pula dbne dbne end y, innerloop b, out_loop rts Now, it is your turn to program. Please make a program, based on the i existing ones above, to display a shifting letter "L". Lab Code Check the following two assembly programs, try to understand each command line, and add comments after each command line, Program 1: this program is to display numbers on 7-segment displays using ports ; B and P. PTP DDRP pti EQU EQU equ $0258 $025A $0268 ddri equ $026A PTB DDRB $01 EQU EQU $03 org movb $1500 #$FF, DDRB movb # $3F, DDRP movb #SFF, ddri forever loopi 1dx movb #Displab movb #SFF, ptj 1, x+, PTB movb1, X+, PTP jsr #DispTab+8 bne loopi forever delay cpx bra Displab dc.b $30, 90e dc.b $5B, $od dc.b $4F, SOb dc.b $66, 907 delay #3 out_loop ldy #2000 inner_loop psha ldab pula dbne end y, inner_loop done b, out_loop rts This program is to shift a number on the 7-segment displays by ; changing the time delay. Check the time delay subroutine carefully ETE DDRP EQU EQU $0258 $025A pti equ $268 ddri equ $26A $01 PTB DDRE EQU EQU $03 org $1500 movb #SFF, DDRB movb #$3F, DDRP movb #SFF, ddri forever loopi ldx #DispTab movb #SFF, pti movb 1,x+, PTB movb 1, x+, PTP jsr delay cpx #DispTab+8 bne loopi bra forever Displab dc.b $3f; $0e dc.b $3f, $od dc.b $3f, $ Ob dc.b $3f, $07 #50 delay out_loop #20000 inner loop psha ldab ldy pula dbne dbne end y, innerloop b, out_loop rts Now, it is your turn to program. Please make a program, based on the i existing ones above, to display a shifting letter "L
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started