如何使用asm在PowerPC/POWER架构上触发BIOS中断(例如以TTY模式打印字符)?

发布于 2024-10-21 17:01:26 字数 331 浏览 3 评论 0原文

标题说的。我想在具有 PowerPC/POWER 架构的机器上将字符打印到屏幕上,或者基本上只是调用一些 BIOS 函数。据我了解,BIOS 与 CPU 的实际连接方式和连接方式通常很重要,所以我们一开始只想关注 qemu 提供的机器。我想我并不是在寻找“sc”命令,实际上我真的不知道在这样的机器上使用哪种方法来执行类似的操作。作为我想要做的示例,让我提供以下 x86 程序集片段,该片段将在 TTY 模式下使用 BIOS 中断打印字符“a”。


mov al, 0x97
mov bh, 0x00
mov bl, 0x07
mov ah, 0x0E
int 0x10

谢谢你!

the title says it. I want to print a character to the screen on a machine with PowerPC/POWER architecture or basically just call some BIOS function. As I understand it usually matters which and how the BIOS is actually connected with the CPU, so let's say for a beginning I just want to focus on the machine qemu provides. I think I am not looking for the 'sc' command, actually I do not really know which kind of methods are used on a machine like this for doing something like that. As an example for what I want to be able to do let me provide the following x86 assembly snippet that shall print the character 'a' using a BIOS-Interrupt in TTY mode.


mov al, 0x97
mov bh, 0x00
mov bl, 0x07
mov ah, 0x0E
int 0x10

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里°也失望 2024-10-28 17:01:26

BIOS 特定于 x86 架构。 BIOS INT 调用不适用于 Power 架构。

您的电源开发板可能有自己的固件和 API。您需要查阅适合您平台的固件开发文档。

BIOS is specific to x86 architecture. BIOS INT calls will not work on a Power architecture.

Your Power dev board probably has its own firmware, with it's own APIs. You will need to consult the firmware development docs for your platform.

落花浅忆 2024-10-28 17:01:26

对于 CPU 外部的架构确实没有事实上的标准(尤其是当你开始做一些疯狂的事情时,比如打开小端模式,主板可能会做一些自己的字节交换...... )。

还有非 PC x86 架构(可能是各种奇怪的超级计算架构)。 Linux 可以针对这些进行编译。

如果 qemu 提供以 PPC Mac 为模型的附加硬件模拟,那么就会有一个支持启动的 ROM 映像,也可能有一些基本的框/文本绘制以及某种视频访问。据我所知,PPC Mac 从来没有像 PC 的“文本模式”(使用视频卡上加载的字体完成绘图); OS X 控制台滚动速度非常慢。

There really isn't a de-facto standard for the architecture external to the CPU (especially when you get around to crazy things like turning on little-endian mode, where the motherboard might be doing some byte-swapping of its own...).

There are also non-PC x86 architectures (probably various odd supercomputing architectures). Linux can be compiled for these.

If qemu provides additional hardware emulation modeled after PPC Macs, then there'll be a ROM image that supports booting, and also probably some basic box/text drawing as well as some sort of video access. To my knowledge, PPC Macs have never had anything like the PC's "text mode" (where the drawing is done with a font loaded on the video card); the OS X console scrolls reeeeeeally slowly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文