Write a inline assembly language program subroutine

Assignment Help Computer Engineering
Reference no: EM132200442

Question :

Write a inline assembly language program subroutine that searches for a character in a string and returns the first occurrence of the character in the string.

The subroutine must be called search and the string is passed in the ESI register. The character to search for should be placed in the AL register and the length of the string is in the ECX register.

The subroutine should return the location of the character in the EBX register, where the first character is 1 and if not found, returns 0.

For example, given a 10 character string in mystring = 'EXCELLENTE', locate the first 'X' character.

lea ESI,mystring
mov al,'X'
mov ecx,10
call search

------returns with EBX =2

lea ESI,mystring
mov al,'Y'
mov ecx,10
call search

------returns EBX = 0

The program must work for any sized string or character combination.

Having trouble writing this program on visual studio 2015 keep getting compile errors when i go by the example above. Need help on one that will compile and work correctly.

Reference no: EM132200442

Questions Cloud

Write a method that search an array using the linear-search : Write a generic method, Search, that searches an array using the linear-search algorithm.
Describe basic contributors that govern the trade system : What is the underlying economic theory upon which todays international trade system is based? Is it the best choice?
Excess of baruim chloride tot : Explain why it is essential that you add an excess of baruim chloride tot he mixture containing the unknown sulfate salt
Percent error to show the accuracy of the student : a.) Use percent error to show the accuracy of the student b.) Determine the range of the data to show the precision of the student
Write a inline assembly language program subroutine : Write a inline assembly language program subroutine that searches for a character in a string and returns the first occurrence of the character in the string.
What is the volume of the sand that was added : After the sand is added the water level in the cylinder is at 31.8 mL. What is the volume of the sand that was added to the cylinder?
Would a financial crisis have been averted : If the Argentine government had simply dollarized instead of erecting a currency board, would a financial crisis have been averted? Discuss.
Help me define corporate social responsibility : Help me conduct research on a Fortune 500 company and how do you determine just how (or if) the company ranks from a CSR perspective.
Write an inter process communication program : Write an inter process communication program in C language to exchange message between parent process and child processes.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Questiona assume a computer has a maximum memory size of

questiona assume a computer has a maximum memory size of 4mb. what is essential address field width?b assume a computer

  Identify two reported court cases that have impacted the

identify two reported court cases that have impacted the evidentiary process or analysis in digital forensic cases

  Define the internet to conduct business transactions

The reading this unit has been about using the Internet to conduct business transactions

  Write a program which asks the user to enter their age

Write a program which asks the user to enter their age and outputs if they are an infant, a child, a teenager or an adult.

  Describe the ways in which database technologies

Describe the ways in which database technologies could be used by an office stationery supply company to achieve low-cost leadership

  You are the network manager for a local university each and

you are the network manager for a local university. every year you are audited to ensure that you are meeting with sox

  Calculate the overall sentiment value for each topic

CS 2034 Data Analytics: Principles and Tools - Determine the total number of Positive, Negative, and Neutral Tweets in the dataset

  Design the decoding circuitry

Arrange the 16 chips needed in the design of Problem (b) as a 4 x 4 array and design the decoding circuitry.

  Define the project schedule when outsourcing critical tasks

Suggest at least three (3) potential challenges of controlling the project schedule when outsourcing critical tasks

  Write down a c program that takes an integer argument

Write a C program that takes an integer argument from command line and outputs the sum of all digits of the integer. For in case , the result of the invocation sum of digits 12345 should be 15.

  What stack elements remain

suppose a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack.

  What will be the thoughts on training

This issue of training is so to each organization, so there is no one-size-fits-all plan. I do believe in training staff just before a new system is deployed, then provide regular update, new feature, best practice, and tips training on an ongoing..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd