segmentation fault - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

segmentation fault

Just starting to study assembly. The following code runs but I'm also getting a notice 'Segmentation fault'. I thought it might have to do with the number of bytes but that doesn't seem to be the issue.

the code:

#HelloWorld.s my second assembly program


HelloWorldString: #label
.ascii "Hello World



#load all the arguments for write()

movl $4, %eax
movl $1, %ebx
movl $HelloWorldString, %ecx
movl $12, %edx
int $0x80



Sign In or Register to comment.