Hi g33ks,

I have bought a new Intel Duo Core based APPLE MacBook with Mac OS X 10.4.6 & Darwin installed. I am trying my hands on assembly language and its creating errors here. On Unix it works well. Big assembly codes were not working, so here is the simple sample code I tried to run. Surprised even this sweet simple code generated errors.

#test.s
.section .data
.section .text

.globl _start
_start:

movl $1, %eax
movl $0, %ebx
int $0x80


It resulted in errors of 'Segment name comma' something...

$ as test.s -o test.o
test.s:2:Expected comma after segment-name
test.s:3:Expected comma after segment-name


In all, I placed comma after segment name as -

#test.s
.section .data,
.section .text,

.globl _start
_start:

movl $1, %eax
movl $0, %ebx
int $0x80


Then, the errors got resolved but EXIT status is not the one feeded in 'ebx' register. Its somewhat against what is expected to be...

$ as test.s -o test.o
$ ld test.o -o test
$ ./test
$ echo $?
164


Here as far as I know the exit status should be the value of EBX register. And, it should be '0' in this case. So why is this bahaving eccentric. Has it something to do with INTEL DUO CORE ?? Are registers changed there ??

Please help ... My assembly level programming is pending .. and so are some of the exploits ...

Thanks in advance,
--
Chill & Cheers!
Posted on 2006-11-23 11:28:01 by nack

and so are some of the exploits ...


Hmmmmmmmmmmm?
Posted on 2006-11-24 00:48:12 by f0dder

Hmmmmmmmmmmm?


ya f0dder!
I do have some exploits that have their code in assembly .. I always have to port to unix for this job :( or to get the shellcode...
I am not sure, whether or not will that make any difference in INTEL Duo Core? or what to do with mach darwin ... :?

Thanks & Cheers,
--
ack
Vulnearbility Research Analyst
Posted on 2006-11-25 03:44:45 by nack
Well, nack, I suggest you (re)read The Community Rules.

Topic locked, pending deletion.

PS: Even a "Vulnerability Research Analyst" would know how to read technical manuals ;)
Posted on 2006-11-25 17:10:27 by SpooK