Seg Fault
Can somebody help me out with why I'm getting a segmentation fault All I'm trying to do is send some text to stdout. The output I get is:.
Some message
Segmentation Fault
--------------------------------------------------------------------------------
section .model small
section .stack 100h
section .data
mesg db 'Some message',0ah, 0
section .text
global _start_start:
mov eax, 4
mov ebx, 1
mov ecx, mesg
mov edx, 13 int 0x80
ret
mov eax, 1
xor ebx, ebx
int 0x80
Quoted 2 lines
Can somebody help me out with why I'm getting a segmentation fault All I'm trying to do is send some text to stdout.
Take out the "ret" line. You have an appropriate exit syscall at the end -- let that execute instead of trying to return.
b
Quoted 21 lines
section .model small
section .stack 100hsection .data
mesg db 'Some message',0ah, 0section .text
global
_start_start:mov eax, 4 mov ebx, 1 mov ecx, mesg mov edx, 13int
0x80
retmov eax, 1
xor ebx, ebx
int0x80