10h 13h如何使用bios例程?

问题描述

我正在尝试使用 bios 例程 10h 13h 打印字符串,但它需要设置寄存器 ESBP。我对汇编还很陌生,还不知道如何正确使用它们,我在网上阅读了一下,发现这些是堆栈指针(不是完全确定?)。

我还有一个怀疑,就是我可能没有使用正确的中断,如果也是这种情况,请告诉我。

这是我目前的代码。

section .text
    global _start
_start:
    mov ah,13h ;thing
    mov al,00h ;subservice 
    mov bh,00h ;display page (what is this??)
    mov bl,00h ;attrributes (what is this??)
    mov cx,len ;length of string
    mov dh,1ah ;row
    mov dl,1ah ;column 
    ;todo: somehow make a pointer to the string??
    mov es,;set this
    mov bp,;set this

    int 0x10
    
    ;padding and magic number
    jmp $
    times 510-($-$$) db 0
    db 0x55,0xAA
section .data
    text db "Hello,World.",0x0a
    len equ $ - text
     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)