Skip to content
Advertisement

Loop Never Ends in Assembly?

Basically, I have below assembly code:

JavaScript

I am trying to loop through 0-50 and print the variable pas or probably buf from input box. But this loop keeps printing pas endlessly. I Presume the issue is the re-assignment of ecx, but otherwise without putting my string into ecx how would I print it? or even execute any thing within my loop at all?

Arc: Linux kali 5.2.0-kali2-amd64 #1 SMP Debian 5.2.9-2kali1 (2019-08-22) x86_64 GNU/Linux

Advertisement

Answer

My assumption by overwriting ecx was correct, fixed it by using push & pop as below:

Credit goes to @Jester.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement