📄 refpy.asm
字号:
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:
;read floppy boot block into 87C00
mov ax,8000h
mov es,ax
mov bx,7c00h
mov ax,201h
mov dl,0
mov dh,0
mov ch,0
mov cl,1
int 13h
;use dos file system service to write it into floppy.bin file at current directory
;create a file
mov ax,dseg
mov ds,ax
mov dx,offset filename
mov cx,0
mov ah,3ch
int 21h
;write to it
mov bx,ax
mov ax,8000h
mov ds,ax
mov dx,7c00h
mov ah,40h
mov cx,200h
int 21h
;close it
mov ah,3eh
int 21h
mov ah,4ch
int 21h
;mission successful
cseg ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -