I’m a little confused about how to print a character to the screen using Assembly. The architecture is x86 (linux). Is it possible to call one of the C functions or is there a simpler way? The character I want to output is stored in a register.
Thanks!
Sure, you can use any normal C function. Here’s a NASM example that uses printf to print some output:
If you only want to print a single character, you could use putchar:
If you want to print out a number, you could do it like this: