data segment
path db "E:\data.txt",0
mes1 db 13,10,"read\write$"
mes2 db 13,10,"read only$"
mes3 db 13,10,"X-files$"
mes4 db 13,10,"system$"
data ends
code segment
assume cs:code, ds:data
start: mov ax,data
mov ds,ax
mov ax, 43h
mov al,0
mov dx, offset path
int 21h
add ax, '0'
int 29h
m1: cmp cx,00h
jne m2
mov ah, 09h
mov dx,offset mes1
int 21h
jmp mx
m2: cmp cx,01h
jne m3
mov ah, 09h
mov dx,offset mes2
int 21h
jmp mx
m3: cmp cx,02h
jne m4
mov ah, 09h
mov dx,offset mes3
int 21h
jmp mx
m4: cmp cx,04h
mov ah, 09h
mov dx,offset mes4
int 21h
jmp mx
mx: mov ax, 4c00h
int 21h
code ends
end start
Атрибуты файла, ассемблер |