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

  Is the yield on high-coupon bonds more likely to be higher

Is the yield on high-coupon bonds more likely to be higher than that on low-coupon bonds when the term structure is upward-sloping?

  Recommend the model that you consider most appropriate

Recommend the model that you consider most appropriate for this service and discuss why this model is the most appropriate for the SharePoint service.

  Discuss the performance of the algorithms

Implement and apply the hill-climbing, simulated annealing, and genetic algorithms to maximize function g(x) used in the previous exercise assuming.

  A method that returns the customer phone number

A method that determines if two customer objects are equal if their name and phone number are the same.

  For the three common methods of system interaction

for the three common methods of system interaction --command language menus and objects-- recall a software package

  Explain why rinse series of steps is not a good algorithm

Explain why the Rinse series of steps is not a good algorithm, and then rewrite the series so it is. Shampooing.

  Create an application that contains a loop to be used

Create an application that contains a loop to be used for input validation. Valid entries are positive integers less than 100.

  Implementing the technology architecture

You are proposing a new system that will link Rapid Cargo with all locations worldwide via a Web site that will also be used by customers to track deliveries.

  How many kinds of silences was he referring to

Discuss the reasons why these are serious matters to David Mura and his father. In what ways were Mura's and his father's thinking similar and/or different?

  Describe an efficient algorithm for determining elements

Describe an efficient algorithm for determining if A and B contain the same set of elements. What is the running time of this method?

  Pros and cons of the model-view-controller

define the benefits and limitations of the model-view-controller (MVC) principle. Identify one way in which MVC helps software designers create better code, and one way in which it deters them.

  Evaluate the size of the plate

A group of 25 power transistors, dissipating 1.5 W each, are to be cooled by attaching them to a black-anodized square aluminum plate and mounting the plate.

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