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

I need help modifying the assembly language program listed below to display a di

ID: 1813150 • Letter: I

Question

I need help modifying the assembly language program listed below to display a digital clock on the LCD of the Fox11 Trainer board. The dip switches on the trainer board when activated need to adjust the time by one hour to simulate different time zones. Here is the link to the programming refference guide: http://www.freescale.com/files/microcontrollers/doc/ref_manual/M68HC11ERG.pdf

Here is the program that needs to be modified.

TEN_MS:  equ 2500
STACK:  equ $8FFF


org     $FF70
lcd_ini: rmb 3 ; initializes 16x2 LCD module
lcd_line1: rmb 3 ; displays 16 char on the first line
lcd_line2: rmb 3 ; displays 16 char on the second line

org $D000
jmp start

delay_10ms:
pshx
ldx     #TEN_MS  ; 2500 x 8 = 20,000 cycles = 10ms
del1: dex   ; 3 cycles
nop   ; 2 cycle
bne del1  ; 3 cycles
pulx
       rts

start: lds #STACK
   jsr delay_10ms ; delay 20ms during power up
    jsr delay_10ms

    jsr lcd_ini  ; initialize LCD

back: ldx    #MSG1  ; MSG1 for line1, x points to MSG1
        jsr lcd_line1

    ldx    #MSG2  ; MSG2 for line2, x points to MSG2
        jsr lcd_line2
     swi                     ; go back to BUFFALO monitor
    
MSG1:   FCC     " FOX11 TRAINER "
MSG2:   FCC     "(C)2002, EVBPLUS"
       end

Explanation / Answer

To which port are the DIP switches connected to, on your board??

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