/ Forside / Teknologi / Udvikling / C/C++ / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
C/C++
#NavnPoint
BertelBra.. 2425
pmbruun 695
Master_of.. 501
jdjespers.. 500
kyllekylle 500
Bech_bb 500
scootergr.. 300
gibson 300
molokyle 287
10  strarup 270
bios-function
Fra : Adrian Gluchow


Dato : 10-09-01 11:00

Hallo,

My problem is to call a BIOS-function from C in MS-Dos. I'm especially
interessted in the function 51h of the System Management Bios.

much thanks
Adrian

Adrian Gluchow
adrian@gluchow.de



 
 
Dansoft Denmark (11-09-2001)
Kommentar
Fra : Dansoft Denmark


Dato : 11-09-01 00:23



"Adrian Gluchow" <adrian@gluchow.de> wrote in message
news:9ni32c$79aop$1@ID-101134.news.dfncis.de...
>
> My problem is to call a BIOS-function from C in MS-Dos. I'm especially
> interessted in the function 51h of the System Management Bios.

Hi.
I hope the code below will be able to illustrate how to use MS-Dos interrupt
in your C code.

#include <conio.h>
unsigned int PSP_Address;

void main()
{
clrscr();
asm{
mov AH,0x51 // Load CPU register, AH with function 51h
int 0x21 // Call MS-DOS service interrupt 21h
mov PSP_Address,BX // Move PSP address to PSP_Address
}
cprintf("%X",PSP_Address); // Print PSP segment address
getch(); // Hit a key
}

Regards
Torben

E-Mail: dansoft-denmark@dansoft-denmark

URL: http://www.dansoft-denmark.dk


Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408925
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste