I'm relatively new to assembly, and had written a simple program to print the numbers 1 to 10 to the screen. However, a short time after I wrote it, I realized I would need to convert it from x86 to x86_64 assembly for it to run on my main workstation.
Most of the conversion had gone rather well, except for one block, which printed the numbers, once they were converted to strings, on the screen.
In x86, the code to print was:
mov edx, eax
pop eax
mov ecx, eax
mov ebx, 1
mov eax, 4
int 80h
When I converted it to x86_64, I attempted to make it work by simply changing the register names.
mov rdx,rax
pop rax
mov rcx, rax
mov rbx, 1
mov rax, 4
int 80h
In the program, rax holds the value of the ASCII number to print.
When the program is run now, in a 64-bit environment, no output is printed to the screen, and the program completes execution without a single error or message.
Is there any way to print strings to the screen in x86_64 assembly?
Thanks in advance!