开发者

How to trigger a BIOS interrupt (e.g. printing a character in TTY mode) on PowerPC/POWER architecture using asm?

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 examp开发者_运维百科le 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!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜