在虚拟机中运行引导加载程序. [英] run a boot loader in a virtual machine.

查看:237
本文介绍了在虚拟机中运行引导加载程序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码制作引导加载程序.::

I have used the following code to make boot loader.::

[BITS 16]
[ORG 0x7C00]

main:
mov ax,0x0000
mov ds,ax

mov si,string
call print
jmp $

print:
mov ah,0x0E
mov bh,0x00

.nextchar
lodsb
or al,al
jz.return
int 0x10
jmp .nextchar
.return
ret
string db 'Assalam-o-Alekum',0
times 512-($-$$) db 0


现在,我被告知要在我的虚拟机Ubuntu中运行它
请告诉我怎么做.
我所知道的是,我应该将其刻录到iso映像文件中,然后将其加载到虚拟机中.我已经用此代码制作了一个iso映像文件,但我不知道如何加载它并在我的虚拟Ubuntu中运行它.请帮助

[edit]添加了代码块[/edit]


now i am told to run it in my virtual machine Ubuntu
Please tell me how to do it.
All i know is that i am supposed to burn it into an iso image file and then load it in the virtual machine. i have made an iso image file of this code but i don''t know how to load it and run it in my virtual Ubuntu. please help

[edit]code block added[/edit]

推荐答案

打印: mov ah,0x0E mov bh,0x00 .nextchar 罗兹 或其他 jz.return 整数0x10 jmp .nextchar .返回 退回 字符串db'Assalam-o-Alekum',0 次512-(
print: mov ah,0x0E mov bh,0x00 .nextchar lodsb or al,al jz.return int 0x10 jmp .nextchar .return ret string db 'Assalam-o-Alekum',0 times 512-(


-


)db 0


现在,我被告知要在我的虚拟机Ubuntu中运行它
请告诉我怎么做.
我所知道的是,我应该将其刻录到iso映像文件中,然后将其加载到虚拟机中.我已经用此代码制作了一个iso映像文件,但我不知道如何加载它并在我的虚拟Ubuntu中运行它.请帮助

[edit]添加了代码块[/edit]


now i am told to run it in my virtual machine Ubuntu
Please tell me how to do it.
All i know is that i am supposed to burn it into an iso image file and then load it in the virtual machine. i have made an iso image file of this code but i don''t know how to load it and run it in my virtual Ubuntu. please help

[edit]code block added[/edit]


这篇关于在虚拟机中运行引导加载程序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆