0

我有一个 Hello World 程序Assembly language

`; ----------------------------------------------------------------------------
  ; helloworld.asm 
  ;
  ; This is a Win32 console program that writes "Hello, World" on one line and
  ; then exits.  It needs to be linked with a C library.   
  ; ------------------------------------------------------------- ---------------

 global  _main
 extern  _printf

 section .text
_main:
 push    message
 call    _printf
 add     esp, 4
 ret
 message:
  db  'Hello, World', 10, 0`

我已经使用nasm并得到了img文件。当我使用它时,Floppy Controller它给出了一个错误..

Failed to open Floppy Disk File D:\helloworld.img
 the Medium D:\helloworld.img Cannot be used as a requested device type

Result Code: E_FAIL (0x80004005)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
4

1 回答 1

0

我认为您必须使用 partcopy 等创建 .img 文件。我的意思是您已经创建了一个图像文件,但必须是正确的。作为示例,您可以使用 copy /b 生成它,但这不会它是对的。或者您可以将其制作为 ISO 文件以使其可用。

miso your.iso -ab your.img
于 2014-07-09T19:19:54.133 回答