"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