当柳上原的风吹向天际的时候...

真正的快乐来源于创造

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  368 Posts :: 1 Stories :: 201 Comments :: 0 Trackbacks
工具:
这个工具用于将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;
posted on 2013-05-30 20:40 何杨 阅读(178) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: