Question: Assembly Language X86 Help. I am trying to create a quick and easy program in visual studio to do the following. 1. Enter String to

Assembly Language X86 Help. I am trying to create a quick and easy program in visual studio to do the following.

1. Enter String to search: food

2. Enter characters to find: odx

3. Found Characters: od

Here is the code I started so far I am unsure if it is correctly done

.

Include Irvine32.inc

.data

prompt1 BYTE "Enter sentence to search: ",0

prompt2 BYTE "Enter what you want to search: ",0

prompt3 BYTE "Characters found: ",0

searchString BYTE 101 dup(0) ;storage for search string

matchString BYTE 101 dup(0) ; storage for match string

.code

main PROC

;mov esi, OFFSET prompt1 ; pointer to the first prompt

;mov edi, OFFSET prompt2 ; pointer to the second prompt

mov eax, OFFSET searchString ; pointer to the first search string

mov ebx, OFFSET matchString ; pointer to the match string

mov ebx, OFFSET prompt1 ; output the name prompt

call writeString ; needs the prompt in edx

mov eax, ebx

mov ecx, SIZEOF searchString-1

call Readstring

;getting second input

mov edx, OFFSET prompt2

call writeString

mov edx, ebx

mov ecx, SIZEOF matchString-1

call ReadString

;at this point, start the findChar procedure

mov ecx, 0

L1:

call findChar

call WaitMsg

invoke ExitProcess,0

main ENDP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!