这个是我从网上找到的,你看看下,没测试过
耦编了一下显示文件名称的dir,实模式下运行过
你可别抄,dta中后几个字节中有其它显示字段,你显示一下
参考一下可以,增加些功能,把代码贴出来
code segment
assume cs:code ,ds:code
org 100h
xfcb db 50h dup(0)
dta db 33h dup(0)
db '$'
start:mov ax,0
push ax
mov ax,code
mov ds,ax
push ds
pop es
mov di ,offset xfcb
mov ax,0ffh
stosb
xor ax,ax
stosw
stosw
stosb
mov al,10h
stosb
inc di
mov cx,0bh
mov al,'?'
rep stosb
mov dx,offset dta
mov ah,1ah
int 21h
mov dx,offset xfcb
mov ah,11h
int 21h
lop: mov dx,offset dta
mov ax,dx
add ax,14h
mov di,ax
add dx,8
mov al,24h
stosb
mov ax,0900h
int 21h
mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
mov ah,2
int 21h
mov dx,offset xfcb
mov ax,1200h
int 21h
cmp al,00
jz lop
mov ax,4c00h
int 21h
code ends
end start