
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
can you please show me with the screen shot of the output, Thank you.
![Write a procedure named Str_find that searches for the first matching occurrence of a source string inside a target string and returns the matching position.
The input parameters should be a pointer to the source string and a pointer to the target string. If a match is found, the procedure sets the Zero flag and EAX
points to the matching position in the target string. Otherwise, the Zero flag is clear and EAX is undefined. The following code, for example, searches for
"5ABC9" and returns with EAX pointing to the "5" in the target string:
INCLUDE Irvine32.inc
Str_find PROTO, pTarget:PTR BYTE, pSource:PTR BYTE
.data
target BYTE "01ABAAAAAABABCC45ABC9012",0
source BYTE "5ABC9",0
str1 BYTE "Source string found at position ",0
str2 BYTE" in Target string (counting from zero).",0Ah,0Ah,0Dh,0
str3 BYTE "Unable to find Source string in Target string.",0Ah,0Ah,0Dh,0
stop DWORD?
lenTarget DWORD?
lenSource DWORD?
position DWORD?
.code
main PROC
INVOKE Str find,ADDR target, ADDR source
mov position, eax
jz wasfound ; ZF=1 indicates string found
mov edx,OFFSET str3; string not found
call WriteString
jmp quit
wasfound:; display message
mov edx,OFFSET str1
call WriteString
mov eax,position; write position value
call WriteDec
mov edx,OFFSET str2
call WriteString
quit:
exit
main ENDP
Str find PROC. [....]
[your code]
Į
!
Į
Str_find ENDP
END main](https://content.bartleby.com/qna-images/question/a72e8965-bd79-4464-a740-a72095a0be2c/ad7d3a7c-6570-45c3-908f-7a464b30154e/gb48sxa_thumbnail.png)
Transcribed Image Text:Write a procedure named Str_find that searches for the first matching occurrence of a source string inside a target string and returns the matching position.
The input parameters should be a pointer to the source string and a pointer to the target string. If a match is found, the procedure sets the Zero flag and EAX
points to the matching position in the target string. Otherwise, the Zero flag is clear and EAX is undefined. The following code, for example, searches for
"5ABC9" and returns with EAX pointing to the "5" in the target string:
INCLUDE Irvine32.inc
Str_find PROTO, pTarget:PTR BYTE, pSource:PTR BYTE
.data
target BYTE "01ABAAAAAABABCC45ABC9012",0
source BYTE "5ABC9",0
str1 BYTE "Source string found at position ",0
str2 BYTE" in Target string (counting from zero).",0Ah,0Ah,0Dh,0
str3 BYTE "Unable to find Source string in Target string.",0Ah,0Ah,0Dh,0
stop DWORD?
lenTarget DWORD?
lenSource DWORD?
position DWORD?
.code
main PROC
INVOKE Str find,ADDR target, ADDR source
mov position, eax
jz wasfound ; ZF=1 indicates string found
mov edx,OFFSET str3; string not found
call WriteString
jmp quit
wasfound:; display message
mov edx,OFFSET str1
call WriteString
mov eax,position; write position value
call WriteDec
mov edx,OFFSET str2
call WriteString
quit:
exit
main ENDP
Str find PROC. [....]
[your code]
Į
!
Į
Str_find ENDP
END main
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 5 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Hello, I need help with this current code. The last indiividual that answered the question, did not answer it. I need to know what is wrong with the code so that the errors in the screen shot of the code can be corrected. Can you please do this? It is really only common sense. This is the code attached and the errors that need corrected. Not that difficult. Please review and assist me with the correct spacing of the code. The current Lab information: 2.15 LAB: Artwork label (modules) Input and output should reflect as stated below: Ex: If the input is: Pablo Picasso 1881 1973 Three Musicians 1921 the output is: Artist: Pablo Picasso (1881 to 1973) Title: Three Musicians, 1921 Ex: If the input is: Brice Marden 1938 -1 Distant Muses 2000 the output is: Artist: Brice Marden (1938 to present) Title: Distant Muses, 2000 Ex: If the input is: Banksy -1 -1 Balloon Girl 2002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 Please review the code and correct the code, so…arrow_forwardPlease impelement one of the point processing techniques below. Use phython3 /Jupyter Notebook. Please se nested loops to itterate through each indvidual pixel. the image file is in pgm format. a. linear transformation b. non linear trasformation c. histogram genertion (the code should output the histogram data to an output file. You can then use an exisiting softeare such as excel to generate the histogram(bar chart) d. Histogram equationarrow_forwardI need to also calculate and display the area of each circle. Also, i need a different error message for when letters are used for input.arrow_forward
- What type of technique is used when an image is transferred by forcing ink through fine mesh or silk?arrow_forwardYou have been approached by the management of an organization to assist them in the purchase of some image capturing devices. To ensure the delivery of quality devices, you would like to explain the following image characteristics to them so they can choose the specific type of device and make funding provisions for them. Using appropriate examples explain the following image characteristics to the management.a) Depthb) Resolutionc) Channeld) Color modelarrow_forwardPlease provide a full code with screenshot of output!arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education