本文介绍了打印签到装配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在开发一个操作系统。我为此在程序集中创建了一个打印功能。当我尝试用这个打印'----'时。这是行不通的。我的代码可以在这个网址上找到:主人的ThunderEagle / printf.asm·Sansoft500 / ThunderEagle·GitHub [ ^ ] b $ b 请帮我解决 我试过的: 以前显示的网址是唯一但我使用的网址 mov al,' - ' int 10h int 10h int 10h 它有效。我如何在我的功能中使用它? [由Jochen Arndt编辑:从GitHub插入的代码] I am working on an Operating System. I create a print function in assembly for this. When i try to print '----' with this. it does not work. My code is available on this url: ThunderEagle/printf.asm at master · Sansoft500/ThunderEagle · GitHub[^] please help me to solveWhat I have tried:The url is shown before is the only but when i use mov al,'-'int 10hint 10hint 10hit works. how i use this with my function?printf:mov ah,0x0emov bh,0x00mov bl,0x07next:mov al,[si]or al,aljz doneint 0x10inc sijmp nextdone:ret 推荐答案 要使用BIOS中断10h打印字符,首先必须在AH中设置该功能... To print a character using BIOS interrupt 10h, you first have to set the function in AH...mov ah, 0x0emov al, '-'int 0x10 如果您希望我们检查您的代码,请将其粘贴到您的代码中问题而不是添加链接... If you wish us to examine your code, please paste it in to your question instead of adding a link... 来自GitHub网址的代码: Code from the GitHub URL:printf:mov ah,0x0emov bh,0x00mov bl,0x07next:mov al,[si]or al,aljz doneint 0x10inc sijmp nextdone:ret 以上要求 DS:SI 指向空终止字符串。所以你需要这样的东西: The above requires that DS:SI is pointing to a null terminated string. So you need something like this: SECTION .dataminus3: db "---", 0 SECTION .TEXT; ...; DS must be .data which it usually is mov si,minus3 call printf 这篇关于打印签到装配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-30 02:18