Question: Write ONE complete assembly program to perform the following tasks: a . Set - up and initialise the table pointer to point to an array
Write ONE complete assembly program to perform the following tasks:
a Setup and initialise the table pointer to point to an array of dataset stored
at the program memory with a starting at address and label it as
Array. The dataset has a total of D elements of bit, signed numbers
given in hexadecimal representation.
b Count positive elements excluding zero in Array and save the result in
POSNUM at address in data memory.
c Sum all the positive elements in the dataset and save the result as a byte
answer to file registers of addresses until at data memory using
the little endian format.
Requirements:
Your main program must start at address Make sure you include
sufficient comments to make your program readable and understandable.
For debugging purpose, in your assembly program, define a data section at the
program memory after your main program. The data section should be named Array and
consists of a dataset of D hexadecimal numbers.
Compile all the deliverables into ONE report which should include the following:
a Flowchart of your program
b The full assembly program
c The entire full MPLAB Output Window clearly showing the result of the
build brocess
d The contents of the program memory displayed as Symbolic for main
programstarting at address
e The contents of the program memory displayed as Opcode Hex for Array
datasection
f The final contents of data memory block of BANK
g The final contents of watch window with the following registers:
WREG,STATUS, TABLAT, TBLPTR FSR
Data Set:
xxxxxxxx
xxxxxxxC xF
xD xxxxD xD xx
xxxxxxxx
xA xxA xxxxE x
xD xF xxxD xxx
xxxxxxxx
xF xC xxxE xxx
xCB xxCxAxAE xBxF xC
xFxD xCxAD xxBxC x
xxB xExxxBC xDA xF
xC xF xExxxCA xA x
xExDxFxDxBC xB xE xEC
xxxxA xxxx
xxxxxDD xCxAxAF
xxBxxDxFC xxE xC
xA xC xxCE xExxxA
xxxxE xExDxxFA
xExFxB xxC xCB xCE xE
xxxxF xxxFxE
xD xxxC xxAxEB xB
xxB xxFxxxC xA
xxDxxxFxExBD xAF
xxFxxDF xCxxxA
xFxxBxxxDxx
xFxxCxAF xxxxD
xAxAxEB xxAxF xCF x
xxBxCxxxCxAx
xAD xAxBB xxExxx
xExEF xB xB xE xxx
xDxxCxxCB xxBxFF
xxBxDxxExxA xC
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
