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

Write a program in assembly using THRSimll 68HC11 Simulator to solve the followi

ID: 3679072 • Letter: W

Question

Write a program in assembly using THRSimll 68HC11 Simulator to solve the following problem. We are given a table of Employee's salaries where there are three months of salary per employee. An accountant put the employees' salary in the wrong order. They presently are in the following order. Salary of month #2/Salary of month #3/Salary of month #1, Empl #2 Salary of month #2/Salary of month #3/Salary of month #1... JjgopJ,#200 Salary of month #2/Salary of month #3/Salary of month #1. Write a program to assemble the salary table in the following order. Salary of month #1/Salary of month #2/Salary of month #3, Empl#2 Salary of month #1/Salary of month #2/Salary of month #3... Empl,#200 Salary of month #1/Salary of month #2/Salary of month #1. Assume all salaries start at $1000(SRAM).

Explanation / Answer

Reset     EQU $FFFE    ; Set symbol Reset to FFFE16

Program EQU $E000    ; Set symbol Program to E00016

        ORG Program      ; Set the assembler’s location to the value  

; represented by symbol Program

Top: LDAEmpl1 #$1000 ; Load the Empl1 register with 1000

        LDAEmpl2 #$2000 ; Load the Empl2 register with 2000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

LDAEmpl200 #$200000 ; Load the Empl200 register with 200000

Loop: LDAEmplSalary #$1000 Load Accumulator Empl#$1 with Salary in #$1000

Count EQU EmplSalary '200000

STAEmpl1 #$1000 ; Store the Empl1 register with 1000

STAEmpl2 #$2000 ; Store the Empl2 register with 2000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

STAEmpl200 #$200000 ; Store the Empl200 register with 200000

  

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