Skip to content

Tag: assembly

mov edx overwrites cx register

I’m trying to print Hi 10 times. This is my code. gdb reports that mov edx, 3 overwrites the cx register to some crazy value and so the loop keeps going forever. What am i doing wrong? Is it because they are the same register? How does one program in assembly with so few registers? Compiling on centos w…

Convert from ascii to integer in AT&T Assembly

How can I convert from ascii to integer? The code is writing an ascii value, and I think that if I can add 48 to value. I can write, but I can’t print, a two-stage number “for example 53 or 156”. How can I print? Answer It’s usually best to think about a high level language version fir…