我很抱歉打扰了我的导师。过去几天我发布了几个疑问,并且他们伸出了手来帮助我。 通过在x86机器上通过Ubuntu11.04中的NASM进行工作,最近我发现了另一个工作混乱。这是“我如何打印8位值”? 假设的代码片断的矿山样子:如何打印NASM中的8位值
section .data
var db "string"
section .text
global main
main:
nop
xor ebx,ebx
mov dl,byte[var+ebx]
mov al, dl ; setting to AL the ASCII character to write
mov bh, 0 ; setting the page number to 0 (all in the same page)
mov bl, 7 ; setting to bl the foreground pixel color
mov ah, 0xE ; INT10 E sub mode --> Write Text in Teletype Mode
int 10 ; "calling" to the interrupt.
nop
现在,我想只打印DL。上面的代码使用了@Shyil The Cat的提示。并引发分段错误。我们如何解决这个问题?
谢谢您提前。
你可以使用C运行时功能吗? – 2013-03-15 09:19:38
@ShmilTheCat:不,我不能用这里PUSH DL cmmand。为此,我正在寻求帮助 – sabu 2013-03-15 09:27:00
@AntoineMathys:您好,先生!我在任何一个工作或窗户都工作。我正在研究Ubuntu 11.04。 – sabu 2013-03-15 11:10:44