IdeaMonk

thoughts, ideas, code and other things...

Thursday, September 06, 2007

My first linux ASM code

  1. SECTION .data  
  2.  msg db "hello world",10  
  3.  len dw 12  
  4.   
  5. SECTION .text  
  6.    global start  
  7. start:  
  8.  mov eax,4 ; the 'write' syscall  
  9.  mov ebx,1 ; on stdout  
  10.  mov ecx,msg ; the string  
  11.  mov edx,len ; its length  
  12.  int 0x80 ; interrupt  
  13.  mov eax,1 ; exit syscall  
  14.  mov ebx,0  
  15.  int 0x80 ;  


Wooh!!! soon i will be reversing apps. nhahahaaa

Labels: ,