工具:
这个工具用于将ASM文件编译.
http://www.blogjava.net/Files/heyang/nasm-2.07-installer.rar建议使用Notepad++书写asm,然后用命令行编译:
>nasm a.asm -o a.com
这个工具能将BIN写入软盘扇区:
http://www.blogjava.net/Files/heyang/FloppyWriter.zip以下是一个例程:
%define _BOOT_DEBUG_
%ifdef _BOOT_DEBUG_
org 0100h
%else
org 07c00h
%endif
mov ax,cs
mov ds,ax
mov es,ax
call DispStr;
jmp $;
DispStr:
mov ax,BootMessage
mov bp,ax
mov cx,32
mov ax,01301h
mov bx,000ch
mov dl,0
int 10h
ret
BootMessage: db "Hello,OS world!XXXXXX is here."
times 510-($-$$) db 0;
dw 0xaa55;