[comp.windows.ms.programmer] Low-Level Operations in Windows

benefiel@wyse.wyse.com (Daniel Benefiel xtmp x2531 dept234) (06/25/91)

I'm building a Windows utility which will be run very infrequently.

The program must do some software INTs to call BIOS routines.  The BIOS
routines, in turn, will do some I/O to devices built into the chipset.
Also, either the application or a BIOS routine will need to read from
the BIOS data segment at 400h.

The first, small, problem, is that I need to link-in an assembly
routine similar to MSC's INT86 (I need to modify BP before the INT, and
check it after).  I can probably figure out how to combine C and assembly,
but if you'd like to comment...

The second, bigger problem is that Windows in protected mode won't like
this low-level stuff.  How, then, is it done?  I suppose drivers are given
I/O privilege and a segment descriptor to access all of RAM directly,
but is this what I have to do?

Since this is my first Windows application (outside of book examples) I
haven't gotten into DLLs or drivers yet, but if they have some bearing,
please explain.

Thanks!

Dan

jarmolow@samsung.com (Tom Jarmolowski) (06/25/91)

In article <3203@wyse.wyse.com>, benefiel@wyse.wyse.com (Daniel Benefiel
xtmp x2531 dept234) writes:
|> I'm building a Windows utility which will be run very infrequently.
|> 
|> The program must do some software INTs to call BIOS routines.  The BIOS
|> routines, in turn, will do some I/O to devices built into the chipset.
|> Also, either the application or a BIOS routine will need to read from
|> the BIOS data segment at 400h.
|> 
|> The first, small, problem, is that I need to link-in an assembly
|> routine similar to MSC's INT86 (I need to modify BP before the INT, and
|> check it after).  I can probably figure out how to combine C and assembly,
|> but if you'd like to comment...
|> 
|> The second, bigger problem is that Windows in protected mode won't like
|> this low-level stuff.  How, then, is it done?  I suppose drivers are given
|> I/O privilege and a segment descriptor to access all of RAM directly,
|> but is this what I have to do?
|> 
|> 
|> Dan


The June 25th issue of PC Magizine has a "Lab Notes" article
(page 371) that describes how to do these kind of things.
Sounded pretty clear to me although I haven't tried it.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Tom Jarmolowski              _/_                    jarmolow@samsung.com
Samsung Software America     /      __     _____    ...uunet!samsung!jarmolow
One Corporate Drive         (__    (_)    /  / <_   Voice: (508) 685-7200  x308
Andover MA 01810                                    Fax: (508) 685-4940