简体   繁体   English

使用引导二进制文件加载软盘映像

[英]Loading a floppy disk image with a boot binary

I've created a small assembly binary to boot from a floppy disk (ideally), but I can't work out how to actually 'put' the binary onto the disk so that it is bootable.我创建了一个小型程序集二进制文件以从软盘启动(理想情况下),但我不知道如何将二进制文件实际“放入”到磁盘上以使其可启动。 I'd rather use a floppy disk image (IMG or VFD) rather than an actual disk (I don't know whether I even have any spare floppy disks anymore).我宁愿使用软盘映像(IMG 或 VFD)而不是实际磁盘(我什至不知道我是否还有备用软盘)。 Can you tell me how this can be done, I can't find much on it and I'm not too familiar with creating bootsectors.你能告诉我如何做到这一点,我找不到太多关于它的信息,而且我对创建引导扇区不太熟悉。

Addendum: I'm using Windows (x64) and don't have linux.附录:我使用的是 Windows (x64) 并且没有 linux。 I do have NASM.我确实有NASM。

EDIT 1: ASM:编辑 1:ASM:

;Bootstrapper source for X-DOS 0.01
;----------------------------------------------
;Experimental bootsector.
;
;my name, created: THURS 30-06-2011 18:01

[BITS 16]
[org 0x7c00] ;start at initial Boot sector in ROM

;jmp short start ;Jump to the start point

;-----------------------------------------------

db "30-06-2011" ;First time worked on.

;-----------------------------------------------

start: 

mov ah, 0eh ;tty print function
xor bl, bl
mov al, 'H'
int 10h ;print the above.
again:
jmp again


;------------------------------------------------

db "my name" ;Me!
      times 510-($-$$) db 0 ;padding
      dw 0xaa55

The boot sector is simply the first sector or the 512 first bytes on the disk, so a binary of your bootsector is effectively a floppy image with your bootsector on it.引导扇区只是磁盘上的第一个扇区或 512 个第一个字节,因此引导扇区的二进制文件实际上是带有引导扇区的软盘映像。

To use a real floppy you just need to copy that to the floppy, by using a floppy image writer (eg rawrite), dd or some specialized piece of software.要使用真正的软盘,您只需使用软盘映像写入器(例如rawrite)、dd 或一些专门的软件将其复制到软盘。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM