Create  Edit  Diff  FrontPage  Index  Search  Changes  Login

はじめてのひき - システムコールはどのように呼び出されるか Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

!! Windows

引数 push して普通に call で呼ぶのが正式。

一応直接呼び出しも調べればできるけど、
Windows のバージョン依存。

[[Windows System Call Table (NT/2000/XP/2003/Vista)|http://www.metasploit.com/users/opcode/syscalls.html]]

!! FreeBSD & x86

EAX にシステムコール番号置いて、
push でスタックに積んで int 0x80 。
なんか一個余分に push しておくこと。
たぶん二度 call して呼ぶことが想定されてるから。

[[FreeBSD Assembly Language Programming|http://www.int80h.org/bsdasm/]]

!! MacOSX & PowerPC

r0 にシステムコール番号、
r1,2,3,... に引数。
そんで sc で呼ぶ。