Piotr Jasiukajtis wrote:
> Dan Mick pisze:
>>>> You need to use the syscall instruction for amd64. See e.g. 
>>>> usr/src/lib/libc/amd64/sys/syscall.s
>>>>
>>>> - Frank
>>>>
>>> For AMD64, solaris doesn't even support the int trap method? 
>>
>> The system call interface in Solaris is quite adaptive.  Syscall, 
>> sysenter, and/or several different traps might be used.  It's 
>> certainly unsafe to assume
>> that some system calling sequence you've noticed on Linux might have 
>> anything to do with system calls on some other operating system.
>>
>> The published interface for system calls is in section 2 of the 
>> manual; what happens between libc and the kernel is private and 
>> undocumented.
>>
>> Of course the source can be found, but it's complicated and was never 
>> intended to be used directly by applications.
> For example it works under 32bit mode:

apparently you didn't understand what I said...

> 
> .data
> str:
> .string "Hello OpenSolaris!!! :)\n"
> .text
> .globl main
> main:
> # WRITE
> movl $4, %eax
> pushl $24
> pushl $str
> pushl $1
> pushl $1
> int $0x91
> 
> # EXIT
> movl $1, %eax
> pushl %eax
> int $0x91
> 
> But I am interested in 64bit syscalls by using 'int' instruction..
> 
> 

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to