Date: Mon, 28 Oct 2002 19:14:00 +0200 (EET) From: oleg@reis.zp.ua To: Anton Shcherbinin <useperl@fastmail.fm> Cc: freebsd-questions@freebsd.org Subject: RE: [freebsd] System calls: int $0x80 vs. lcall $7, $0 Message-ID: <XFMail.20021028191400.oleg@reis.zp.ua> In-Reply-To: <12523076531.20021028155722@fastmail.fm>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28-Oct-2002 Anton Shcherbinin wrote: > Gentlemen, I am new to FreeBSD programming and going to write a simple > program which will not use libc. I tried to find out how to make a > system call of FreeBSD kernel. But 2 different sources of information, a > book on assembly programming and FreeBSD Developers' Handbook, say > contrary things, and I got completely confused. > > My assembly book says (trying to translate from Russian into English): > ``Numbers of system calls (which are in /usr/include/sys/syscall.h file) > and way of getting to entry point (long call to 0007:00000000) are > standardized in SysV/386 ABI, but for example Linux uses another > convention -- interrupt 80H. [...] In more traditional Unix systems -- > FreeBSD and Solaris -- system calls are implemented according to common > SysV/386 standard.'' > > On the other hand, > http://www.freebsd.org/doc/en/books/developers-handbook/x86-system-calls.html > says: ``Further, although the kernel is accessed using int 80h [...]'' > > So what's the truth? int $0x80 or lcall $7,$0 ? Or are both possible? Both > If both, which is better? What is "SysV/386 ABI standard" and does First method, "lcall $7,$0" for backward compatibility with old FreeBSD versions only. > FreeBSD follow it? If it follows this standard, where could I get > this standard from? (I did try Google search, but found nothing > resembling a standard or official documents). > > Thanks a lot for any clues. If this maillist is not the most appropriate > place to ask questions like this, please direct me to the right place. Hm, freebsd-hackers@freebsd.org? > > -- > Anton > > =================================================================== > freebsd mailing list. > To Unsubscribe: send mail to majordomo@freebsddiary.org.ua > with "unsubscribe freebsd" in the body of the message With best wishes Oleg V. Nauman NO37-RIPE To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021028191400.oleg>