home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,970 of 4,675   
   Melzzzzz to Xavier Maillard   
   Re: simple ASM prog segfault   
   26 Nov 19 21:06:00   
   
   From: Melzzzzz@nospicedham.zzzzz.com   
      
   On 2019-11-26, Xavier Maillard  wrote:   
   > Hello,   
   >   
   > I am just starting to learn writing some fun progs in asm.   
   >   
   > I just jotted down some instructions, assembled it and linked it.   
   > Running it just segfault.   
   >   
   > The question is: why ? :)   
   >   
   > The program is just this:   
   >   
   > .section .data   
   >   
   > .section .text   
   > .globl _start   
   > _start:   
   >   
   > movl $1, %eax   
   > movl $0, %ebx   
   > int $0x80   
   >   
   > As you can see, it just does *nothing*   
   >   
   > Assembled it using: as   
   > Linked it with ld   
   >   
   > This is running on a WSL Debian system (should matter I guess)   
   >   
   > Any pointer on what's wrong with this ?   
      
   It's probably because you assembled and linked with 64 bits.   
   You should specify 32 bits...   
      
      
   --   
   press any key to continue or any other to quit...   
   U niÄ   
   emu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec   
   Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan   
   narod poludi --  Zli Zec   
   Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi   
   bili naoruzani. -- Mladen Gogala   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca