08-15-2010, 01:49 PM
Code:
section .data
msg1: db 'lolcakes',0xa ;Our String
section .text
global _start
_start:
mov eax, 4 ;sys_write
mov ebx,1 ;1 = STDOUT
mov edx,9 ;Length of our string
mov ecx,msg1 ;Put our string in ecx
mov dword [ecx+3],0x73746163 ;Change cakes to cats
mov dword [ecx+7],$0 ;Null out the extra s
int 0x80 ;invoke the kernel
mov eax,1 ;sys_exit
mov ebx,0 ;exit with code of 1;
int 0x80 ;invoke the kernel