Re: Strange behaviour in assembly language program

2004-03-11 Thread ari
[EMAIL PROTECTED] said this stuff: > This code works to return 0x57: 31 c0 40 6a 57 50 cd 80 > But that needs 8 bytes! Can't it be shortened? > I noticed that some registers contain zero on program startup. Can I safely > assume they are always initialized to zero and just leave that 31 c0 out?

Re: Strange behaviour in assembly language program

2004-03-11 Thread Chris Doherty
On Wed, Mar 03, 2004 at 08:12:28PM +, Daniela said: > This code works to return 0x57: 31 c0 40 6a 57 50 cd 80 > But that needs 8 bytes! Can't it be shortened? this may not help you, and was done on Linux, but is an excellent read if you haven't seen it (actually it's fun to read even if you

Re: Strange behaviour in assembly language program

2004-03-03 Thread Daniela
On Wednesday 03 March 2004 16:26, ari wrote: > [EMAIL PROTECTED] said this stuff: > > > .text > > > .global _start > > > _start: > > > pushl $8 > > > pushl $0 > > > movl$1, %eax > > > int $0x80 > > > > With this suggestion, it always returns 0 instead of

Re: Strange behaviour in assembly language program

2004-03-03 Thread Daniela
On Wednesday 03 March 2004 16:26, ari wrote: > [EMAIL PROTECTED] said this stuff: > > > .text > > > .global _start > > > _start: > > > pushl $8 > > > pushl $0 > > > movl$1, %eax > > > int $0x80 > > > > With this suggestion, it always returns 0 instead of

Re: Strange behaviour in assembly language program

2004-03-03 Thread ari
[EMAIL PROTECTED] said this stuff: > > .text > > .global _start > > _start: > > pushl $8 > > pushl $0 > > movl$1, %eax > > int $0x80 > > With this suggestion, it always returns 0 instead of 1. > Shouldn't pushl place 4 bytes on the stack? It translates

Re: Strange behaviour in assembly language program

2004-03-02 Thread Daniela
On Tuesday 02 March 2004 20:15, ari wrote: > [EMAIL PROTECTED] said this stuff: > > Finally I came up with the simplest ASM program that reproduces the > > error. Here it is: > > > > .text > > .global _start > > _start: > > pushl $0 > > movl$1, %eax > > int $0x80 > > > > I loo

Re: Strange behaviour in assembly language program

2004-03-02 Thread ari
[EMAIL PROTECTED] said this stuff: > Finally I came up with the simplest ASM program that reproduces the error. > Here it is: > > .text > .global _start > _start: > pushl $0 > movl$1, %eax > int $0x80 > > I looked everywhere (Developer's handbook, Google, ...) to find

Strange behaviour in assembly language program

2004-03-02 Thread Daniela
Hi! I'm already a bit experienced with assembly, and started to enter my executables directly in the hexeditor (for educational purpose only; I know this is poor programming style). I do not yet fully understand all aspects of the ELF header, but I managed to somehow write working ELF executabl