Question

# In Assembly x86 please Write an assembly program(call it lab6_file1.asm)that contains 10 double words in memory...

Write an assembly program(call it lab6_file1.asm)that contains 10 double words in memory in the .data section where the first five initialized to 0 and the last five are initialized to 1. In addition, reserve ten uninitialized double words in .bss section. Using a loop, write an assembly program that copies the ten initialized values into the ten reserved double words, starting at the last position, moving to the first(reverse order the data in your uninitialized array). After the data move, write a new loop to print out the contents of the double word array in .bss section, on one line with a single space after each number.

Example:

Input in initialized memory: 0 0 0 0 0 1 1 1 1 1

Output from uninitialized memory: 0 0 0 0 0 1 1 1 1 1

Cn = 1/2(an - jbn)

the following signal is even so an=0

here odd quarter-wave symmetry exist so

bn = 8/T\int_{0}^{T/4}f(t)\sin ((2n-1)wt)dtbn = 8/T\int_{0}^{T/4}f(t)\sin ((2n-1)wt)dt=8/T\int_{0}^{T/4}\sin ((2n-1)wt)dt

= -( 8/(2n-1)wt)cos((2n-1)wt)|^{T/4}0

=4/(2n-1)π

C2n-1= -i/2(b2n-1)

C2n-1= -2i/(2n-1)π

Python code using this code we can generate all the plot take n as input

import numpy as np
import matplotlib.pyplot as plt

plt.style.use("ggplot")
x_ = np.linspace(-20,20,10000)

T = 2
n_max=input()

def wn(n):
global T
wn = (2*np.pi*n)/T
return wn
def fourierSeries(n_max,x):
fun=0
for n in range(1,n_max):
if i%2==1:
try:
fun = fun + (1/i)*np.sin(wn(n)*x)
except:
print("pass")
pass
return fun

f = []
for i in x_:
f.append(fourierSeries(n_max,i))

plt.plot(x_,f,color="red",label="Fourier series approximation")
plt.legend()
plt.show()

#### Earn Coins

Coins can be redeemed for fabulous gifts.