Question: Check my code in mariejs, aply the moving average filter Writing assembly code to perform an 8 - sample Moving Average with 2 0 0
Check my code in mariejs, aply the moving average filter
Writing assembly code to perform an sample Moving Average with samples stored in memory involves several steps, including initializing registers, storing and loading data into memory, performing the sum of the samples, and dividing to obtain the average.
Datos en memoria
HHEXNUM HEX B
HEXNUM HEX E
HEXNUM HEX D
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX F
HEXNUM HEX D
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX B
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX C
HEXNUM HEX
HEXNUM HEX
HEXNUM HEX
ccontinue with al the numbers until HEXNUM
Variables
AVGRESULT DEC
WINDOWSIZE, DEC
CURRENTINDEX, DEC
SUM, DEC
TEMPINDEX, DEC
TEMPSUM, DEC
DIVCOUNT, DEC
ONE, DEC
ENDINDEX, DEC
Inicializacin de registros y variables
LOAD ENDINDEX
STORE CURRENTINDEX
Bucle principal para calcular el promedio mvil
MAINLOOP, LOAD CURRENTINDEX
ADD ONE
STORE TEMPINDEX
LOAD TEMPINDEX
SUBT ENDINDEX
SKIPCOND
JUMP FINISH
CLEAR
STORE SUM
LOAD WINDOWSIZE
STORE DIVCOUNT
LOAD CURRENTINDEX
STORE TEMPINDEX
SUMLOOP, LOAD TEMPINDEX
ADD HEXNUM
ADD SUM
STORE SUM
LOAD TEMPINDEX
ADD ONE
STORE TEMPINDEX
LOAD TEMPINDEX
SUBT ENDINDEX
SKIPCOND
JUMP ENDSUMLOOP
JUMP SUMLOOP
ENDSUMLOOP, LOAD SUM
SUBT WINDOWSIZE
SKIPCOND
JUMP AVGRESULT
LOAD DIVCOUNT
ADD ONE
STORE DIVCOUNT
AVGRESULT, LOAD SUM
DIVIDELOOP, LOAD DIVCOUNT
SUBT ONE
SKIPCOND
JUMP FINISH
LOAD DIVCOUNT
ADD ONE
STORE DIVCOUNT
JUMP DIVIDELOOP
Guardar el promedio en AVGRESULT
LOAD SUM
SUBT DIVCOUNT
STORE AVGRESULT
Actualizar el ndice
LOAD CURRENTINDEX
ADD ONE
STORE CURRENTINDEX
JUMP MAINLOOP
Etiqueta de finalizacin
FINISH, HALT
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
