小编Leo*_*rdo的帖子

使用 BIOS 例程 INT10h 从变量打印字符

有人知道下面的代码有什么问题吗?

我无法让它按照我想要的方式工作。我只想打印变量的单个字符(字母“h”)。

为此,我只需通过方括号使用间接寻址来复制内容

[]

; Set BIOS print screen settings
mov ah, 0x0e ; Teletype
mov bh, 0  ; Page number
mov bl, 4  ; Red on black (00000100 - High 0000 is black, low 0100 is red)
mov cx, 1  ; Writes one character

; Printing to screen
mov al, [msg] ; Copy the contents of 'H' into 'al'; IT SEEMS THIS IS NOT WORKING!!!
jmp print_char ; Jump to executable code and do not let CPU step on …
Run Code Online (Sandbox Code Playgroud)

assembly bios nasm bootloader x86-16

2
推荐指数
1
解决办法
1531
查看次数

标签 统计

assembly ×1

bios ×1

bootloader ×1

nasm ×1

x86-16 ×1