Question

**In Assembly x86 please**

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**

Answer #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()

Write a program in assembly language for x86 Processors, that
uses a loop to calculate the first seven values of the Fibonacci
number sequence, described by the following formula:
Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n -1) + Fib(n - 2)

x86 irvine library assembly code
Write a complete program that: 1. Prompt the user to enter 10
numbers. 2. save those numbers in a 32-bit integer array. 3. Print
the array with the same order it was entered. 3. Calculate the sum
of the numbers and display it. 4. Calculate the mean of the array
and display it. 5. Rotate the members in the array forward one
position for 9 times. so the last rotation will display the array
in...

Please write an assembly program which adds 5 to the contents of
memory locations $00FF to $01DE and convert the program into
machine code after.

Please Write the whole program in assembly i am able to
calculate the fibonacci series but not sure how to print it in
reverse order. Please give a Complete code !!
Programming Exercise 1 (10 points): [call it
Ass2-Q1.asm] Write an ASM program that reads an integer number N
and then displays the first N values of the Fibonacci number
sequence, described by: Fib(0) = 0, Fib(1) = 1, Fib(N) = Fib(N-2) +
Fib(N-1)
Thus, if the input is N...

Please complete in MASM (x86 assembly
language). Use the code below to get
started.
Write a program that uses a loop to calculate the first seven
values of the Fibonacci number sequence, described by the following
formula:
Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n – 1) + Fib(n – 2).
.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO,dwExitCode:DWORD
.data
; define your variables here
.code
main PROC
; write your assembly code here
INVOKE ExitProcess,0
main...

PLEASE COMMENT CODE AND TEST THAT IT WORKS:
Write a assembly program to find the largest item in an array
and store it in a AX.
Hint: Use both Jump and loop instruction to write the
program.
logic:
Assume that the first item of the array is the minimum and store
it in AX
Write a loop. Inside the loop, compare the each array item with
the AX
If the array item is less than the AX, update AX with...

WRITE C++ PROGRAM FOR 1,2,3,4 PARTS of question,
DO ADD COOMENTS AND DISPLAY THE OUTPUT OF A RUNNING COMPILER
QUESTION:
1) Fibonacci sequence is a sequence in which every number after
the first two is the sum of the two preceding ones. Write a C++
program that takes a number n from user and populate an array with
first n Fibonacci numbers.
For example:
For n=10
Fibonacci Numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55
2):
Write...

1.Write a function which takes a string that contains
two words separated by any amount of whitespace, and returns a
string in which the words are swapped around and the whitespace is
preserved. Hint: use regular expressions where \s detects the
whitespaces in a string.
Example: given "Hello World",
return
"World Hello"
2.Pandas exercises:
Write a python program using Pandas to create and
display a one-dimensional array-like object containing an array of
data.
Write a python program using Pandas to...

CAN YOU PLEASE WRITE THIS CODE IN A DIFFERENT WAY 'EASIER AND
BETTER'
QUESTION
Using C++
11. Write a function that will merge the contents of two sorted
(ascending order) arrays of type double values, storing the result
in an array out- put parameter (still in ascending order). The
function shouldn’t assume that both its input parameter arrays are
the same length but can assume
First array
04
Second array
Result array
that one array doesn’t contain two copies of...

Written in MASM Assembly
Problem Definition:
Write a program to calculate Fibonacci numbers.
• Display the program title and programmer’s name. Then get the
user’s name, and greet the user.
• Prompt the user to enter the number of Fibonacci terms to be
displayed. Advise the user to enter an integer in the range [1 ..
46].
• Get and validate the user input (n).
• Calculate and display all of the Fibonacci numbers up to and
including the nth...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 5 minutes ago

asked 7 minutes ago

asked 9 minutes ago

asked 11 minutes ago

asked 12 minutes ago

asked 46 minutes ago

asked 54 minutes ago

asked 58 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago