How Win32 & Linux implement System Call

来源:互联网 发布:大理电视台网络直播 编辑:程序博客网 时间:2024/05/16 10:21

Through the Linux source, we know that Linux implements system call by a soft interrupt (0x80) (at least the version 0.11). With OllyDbg's help, I found that Windows uses call gate to make system call work. Please look at the disassmebled info of the printf call:

004012BA  |. C70424 0030400>MOV DWORD PTR SS:[ESP],StreamBu.00403000 ; |ASCII "Hello"
004012C1  |. E8 3A050000    CALL <JMP.&msvcrt.printf>                ; /printf

So interesting...