I am new in assembly and I want to print a value stored in a register with assembly AT&T.
.text
.globl main
main:
mov $42, %edx
# what should be here?
mov $1, %eax
mov $0, %ebx
int $0x80
I found many "Hello, world" examples with section ".data" and write
calls, but write
accepts a string buffer, not an integer. What is the most elegant way to output the number in %edx
into stdout?