Answer the question
In order to leave comments, you need to log in
How to make a loop in assembler?
Here is my code
.386
.model flat, stdcall
option casemap: none
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data
msg1 db "Please, enter String: ",0, 13
numberOfChanges db 0
.data?
buffer db 256 dup(?)
.code
start:
push offset msg1
call StdOut
push 256
push offset buffer
call StdIn
mov edi, offset buffer
mov al, "a"
repne scasb
mov al, "b"
inc numberOfChanges
mov byte ptr[edi-1], "b"
push offset buffer
call StdOut
exit:
push 0
call ExitProcess
End start
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question