Re: How can I support the BIOS function call?
From: Niki Estner (niki.estner_at_cube.net)
Date: 09/16/04
- Next message: Joerg Jooss: "Re: HttpWebRequest file upload problem"
- Previous message: Jonathan Pierce: "Re: Decompiler.NET reverse engineers your CLS compliant code"
- In reply to: Scott Allen: "Re: How can I support the BIOS function call?"
- Next in thread: Scott Allen: "Re: How can I support the BIOS function call?"
- Reply: Scott Allen: "Re: How can I support the BIOS function call?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Sep 2004 10:42:05 +0200
Sorry Scott, I probably misunderstood your post then. I though you were
saying the "int" instruction can't be used at all in user mode, and would
always result in a priviledged instruction fault.
Niki
"Scott Allen" <bitmask@[nospam].fred.net> wrote in
news:65jhk05jisfulp1qmab5m7k9gq9saibqj0@4ax.com...
> Niki:
>
> The transfer of control from user mode to kernel mode is precisely
> because the INT causes the CPU to vector off to an exception handler
> in kernel mode. If you have all the registers setup correctly, you
> might get Win32 to do something interesting, like open a file or
> create a new process. If you have parameters setup for the older DOS
> INT handler, you'll get an access violation. Windows can't allow just
> any program to come along and get that close to the hardware.
>
> --
> Scott
> http://www.OdeToCode.com
>
> On Wed, 15 Sep 2004 21:54:53 +0200, "Niki Estner"
> <niki.estner@cube.net> wrote:
>
>>"Scott Allen" <bitmask@[nospam].fred.net> wrote in
>>news:nj4hk0lsfpfmgqlguo6l0jv5fe907cniji@4ax.com...
>>> Steve:
>>>
>>> No BIOS function calls from C#, that is correct. It's really more the
>>> case that the underlying platform (Win32) does not support BIOS
>>> function calls - the INT instruction will generate an access violation
>>> from user mode code. The only way to get down this low is to use the
>>> DDK and write a device driver, or look for a Win32 API that might do
>>> what you need.
>>
>>Although I must admit I'm not an expert either, I think you are wrong. In
>>the times of DOS the INT instruction was used to call BIOS and operating
>>system functions (I think "int 21h" used to be the "DOS" interrupt, but
>>I'm
>>not 100% sure about that).
>>Nowadays, this technique is used to transfer control from user mode to
>>kernel mode. Have a look at:
>>
>>http://www.sysinternals.com/ntw2k/info/ntdll.shtml
>>
>>To the OP: I'm pretty sure there is no way to do this in managed code;
>>You'll have to use MC++ for that. What are you trying to do?
>>
>>Niki
>>
>
- Next message: Joerg Jooss: "Re: HttpWebRequest file upload problem"
- Previous message: Jonathan Pierce: "Re: Decompiler.NET reverse engineers your CLS compliant code"
- In reply to: Scott Allen: "Re: How can I support the BIOS function call?"
- Next in thread: Scott Allen: "Re: How can I support the BIOS function call?"
- Reply: Scott Allen: "Re: How can I support the BIOS function call?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|