我在哪里BIOS.h文件中,称为Mingw导入? [英] Where do i get BIOS.h file, to import in Mingw?

查看:180
本文介绍了我在哪里BIOS.h文件中,称为Mingw导入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

称为Mingw没有默认BIOS.h文件。而且我使用NetBeans IDE和第三方工具的MinGW做系统编程。 。 ?

任何一个可以帮助我,我在哪里可以得到该文件?

这是code。

 #包括LT&;&stdio.h中GT;
#包括LT&;&BIOS.H GT;
#包括LT&;&DOS.H GT;焦炭ST [80] = {你好世界$};无效的主要()
{
    _DX =(无符号整数)ST;
    _ah = 0×09;
    geninterrupt(0×21);
}


解决方案

无处,你不知道。

这些头文件( DOS.H bios.h )是从16位DOS编译器,如的Turbo C或Open在Watcom C. MinGW的是32位编译器为Windows。因此,即使你收到这些头文件,他们将是无用的,因为:


  1. 他们用gcc不兼容

  2. 他们还需要对应的库,因为标题本身并不包含类似 geninterrupt的东西定义()

  3. DOS中断服务( INT 21H )不可用Win32程序

此外,GCC不支持变量别名为CPU寄存器(如 _DX _ah )。

您要么需要使用相应的16位DOS编译器或编写使用可从GCC和Win32 API功能的Windows程序。

Mingw don't have BIOS.h file by default. And i'm doing system programming by using netbeans IDE and a third party tool mingw. . ?

Can any one helps me, where do i get that file?

This is the code.

#include<stdio.h>
#include<BIOS.H>
#include<DOS.H>

char st[80] ={"Hello World$"};

void main()
{
    _DX = (unsigned int) st;
    _AH = 0x09;
    geninterrupt(0x21);
}

解决方案

Nowhere, you don't.

Those header files (dos.h and bios.h) are from 16-bit DOS compilers such as Turbo C or Open Watcom C. MinGW is a 32-bit compiler for Windows. As such, even if you get these header files, they will be useless because:

  1. they are incompatible with gcc
  2. they also need counterpart libraries because the headers themselves do not contain definitions of things like geninterrupt()
  3. DOS interrupt services (int 21h) are not available to Win32 programs

Further, gcc does not support variables aliasing to CPU registers (e.g. _DX, _AH).

You either need to use the appropriate 16-bit DOS compiler or write a Windows program using functionality available from gcc and Win32 API.

这篇关于我在哪里BIOS.h文件中,称为Mingw导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆