x86 assembly - printing a character given an ascii code
问题 I am new to assembly programming and am having trouble printing a character to the screen. Every time I execute my program I get a segmentation fault and I am not sure why. .section .data A: .long 65 # ascii code for 'A' .section .text .globl _start _start: movl $1, %edx # length of character to print, 1 movl A, %ecx # what I want printed movl $1, %ebx # file descriptor for STDOUT movl $4, %eax # syscall number for sys_write int $0x80 # calls kernel movl $0, %ebx # return status movl $1, %eax