Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: In x 8 6 Assembly language Coding style is the key objective, follow the instructions & restrictions. Add comments in your main program to

Instructions: In x86 Assembly language
Coding style is the key objective, follow the instructions &
restrictions.
Add comments in your main program to show what you are doing at
each major step. Connect comments to the bullets in the
instructions.
You are asked to define 3 functions; and then set up a main
program that properly utilizes these functions.
o There are no parameters or return values
The program functions should call C functions in the manner
specified.
Function 1:
o At the top of the program, reserve space for a 1000
character string
o In the function
Prompt user to type in a string
Print the string & length with a single print()
Function 2:
o Print exactly 3 random numbers, 1 per line
o These are just raw numbers, no need to convert to a
specific range. No seed.
o A number is ODD if the rightmost binary digit is 1. Count
how many of the random values are odd. Print that count.
Use this technique rather than division.
Function 3:
o Prompt the user and ask for 2 integers using a single
scanf()
o Sample output from the function should be similar to::
Up 47--4567
Up 55--5
Up 83-
This must be a single printf(): Up 47--
Create a main program that uses the above functions in your
solution.
o Main is mostly just 3 function calls and maybe a bit of
printing.
Sample output 1::
====================
Enter string: computer
Text -computer- has len 8
1804289383
846930886
1681692777
Odd count: 2
Enter 2 numbers: 35
Count up 35--345
@@@@@@@@@@@@@@@@@@@@
Sample output 2::
====================
Enter string: table
Text -table- has len 5
1804289383
846930886
1681692777
Odd count: 2
Enter 2 numbers: 84
Count up 84--
@@@@@@@@@@@@@@@@@@@@

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions