wrfpy.asm
来自「一个朋友写的操作系统源码」· 汇编 代码 · 共 64 行
ASM
64 行
sseg segment STACK
db 128 dup (0)
sseg ends
dseg segment 'data'
filename db 'floppy.bin','0'
dseg ends
cseg segment 'code'
assume cs:cseg;ds:dseg
start:
;write floppy.bin into sector 0 of floppy diskette
;open floppy.bin
mov ax,dseg
mov ds,ax
mov dx,offset filename
mov ax,3d00h
int 21h
;read it into 87C00
mov bx,ax
mov ax,8000h
mov ds,ax
mov dx,7c00h
mov ah,3fh
mov cx,200h
int 21h
;close it
mov ah,3eh
int 21h
;write floppy boot block from 87C00
mov ax,8000h
mov es,ax
mov bx,7c00h
mov ax,301h
mov dl,0
mov dh,0
mov ch,0
mov cl,1
int 13h
mov ah,4ch
int 21h
;mission successful
cseg ends
end start
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?