使用bios中断编程 [英] programming using bios interrupts

查看:123
本文介绍了使用bios中断编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建一个程序,从用户读取文本并仅使用BIOS中断显示它。代码是C ++和程序集之间的混合代码

How can I make a program that reads a text from the user and displays it using BIOS interrupts only. The code is a mixed code between C++ and assembly

推荐答案

如果你使用的是真正古老的操作系统,你可以这样做。对于英特尔的情况CPU,它可能是不使用保护环的操作系统,它允许您执行中断并直接在应用程序中处理它们。特别是,当您仅使用CPU的实模式(x86兼容)时,情况总是如此,但这意味着只有1M的可寻址空间。这种系统的例子如果是MS-DOS。事实上(不太广为人知的事实:-)),您甚至可以使用一些保护模式操作系统,轻松访问所有内存和指令集,无需保护环。此类系统的示例是Windows 3.0,3.1和Windows 9x。请参阅:

http://en.wikipedia.org/wiki/Ring_%28computer_security %29 [ ^ ],

http://en.wikipedia.org/wiki/Real_mode [ ^ ],

http://en.wikipedia.org/wiki/Protected_mode [ ^ ],

http://en.wikipedia.org/wiki/Windows#Windows_3.0_and_3.1 [ ^ ]。



我不知道你在哪里可以得到这样的系统,但我'女士这是可能的。然后你可以使用BIOS:

http://en.wikipedia.org/wiki/BIOS [ ^ ],

< a href =http://www.tomshardware.com/reviews/bios-az,1200.html> http://www.tomshardware.com/reviews/bios-az,1200.html [< a href =http://www.tomshardware.com/reviews/bios-az,1200.htmltarget =_ blanktitle =New Window> ^ ],

http://www.tomshardware.com/reviews/bios-beginners,1126.html [ ^ ]。



请注意,BIOS是开发PC及其标准的重要障碍,因此它最终将以一种或另一种方式逐步淘汰。另见:

http://en.wikipedia.org/wiki/UEFI [< a href =http://en.wikipedia.org/wiki/UEFItarget =_ blanktitle =New Window> ^ ]。



祝你好运,

-SA
You can do it if you use really archaic OS. In the case of Intel CPUs, it could be the OS not using protection rings, which would allow you to perform interrupts and handle them directly in an application program. In particular, this is always the case when you use only the real-mode (x86-compatible) of the CPU, but it would mean having only 1M of addressable space. The example of such system if MS-DOS. As a matter of fact (less widely known fact :-)), you can use even some protected-mode OS with relaxed access to all memory and instruction set, without protection rings. The example of such system is Windows 3.0, 3.1 and Windows 9x. Please see:
http://en.wikipedia.org/wiki/Ring_%28computer_security%29[^],
http://en.wikipedia.org/wiki/Real_mode[^],
http://en.wikipedia.org/wiki/Protected_mode[^],
http://en.wikipedia.org/wiki/Windows#Windows_3.0_and_3.1[^].

I have no idea where you can get such a system, but I'm sure it's possible. And then you can use BIOS:
http://en.wikipedia.org/wiki/BIOS[^],
http://www.tomshardware.com/reviews/bios-a-z,1200.html[^],
http://www.tomshardware.com/reviews/bios-beginners,1126.html[^].

Note that BIOS is an essential obstacle in development of PCs and their standard, so it will eventually be phased out in one or another way. See also:
http://en.wikipedia.org/wiki/UEFI[^].

Good luck,
—SA


这篇关于使用bios中断编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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