если, кому интересно - я нашел где ошибки(глупые, надо сказать),ниже правленный файл.но вот вопрос - есть ли в рунете хорошие Асм-форумы?
code segment
assume cs:code,ds:data,ss:stk
main proc
mov ax,data
mov ds,ax
xor bx,bx
at_start:
mov ah,09h
mov dx,offset what_to_do
int 21h
mov ah,01h
int 21h
cmp al,32h; нажали 2 ?
je make_file
cmp al,31h; нажали 1 ?
je delete_file
jmp at_start
;------------------
delete_file:
mov dx,offset del_good
xor bx,bx
;--->
call input
mov ah,41h
mov dx,offset fname
int 21h
jc error
mov byte ptr fname[bx],0dh
mov byte ptr fname[bx+1],0ah
; mov dx,offset clrscr
; mov ah,09h
; int 21h
xor bx,bx
xor dx,dx
;--->
call output
mov dx,offset sendok
mov ah,09h
int 21h
jmp fin
;------------------
make_file:
xor bx,bx
mov dx,offset make_good
;--->
call input
mov dx,offset fname
mov ah,3ch
mov cx,20h;атрибут архива
int 21h
mov byte ptr fname[bx],0dh
mov byte ptr fname[bx+1],0ah
xor bx,bx
xor dx,dx
; mov dx,offset clrscr
; mov ah,09h
; int 21h
;--->
call output
mov dx,offset makeok
mov ah,09h
int 21h
jmp fin
error:
call new_string
cmp ax,02h
je no_file
cmp ax,03h
je no_ctlg
cmp ax,05h
je bad_chmod
jmp fin
no_file:
mov dx,offset send_nofile
jmp send
no_ctlg:
mov dx,offset send_noctlg
jmp send
bad_chmod:
mov dx,offset send_badchmod
send:
mov ah,09h
int 21h
fin:
mov ax,4c00h
int 21h
;---------
input proc
mov ah,09h
int 21h
goin_input:
mov ah,01h
int 21h
cmp al,13
jne another
je to_ret
another:
mov fname[bx],al
inc bx
jmp goin_input
to_ret:
ret
input endp
;----------
output proc
call new_string
goin_output:
cmp fname[bx],20h
je here
mov ah,06h
mov dl,byte ptr fname[bx]
int 21h
inc bx
jmp goin_output
here:
ret
output endp
new_string proc
push ax
mov ah,06h
mov dl,0dh
int 21h
mov ah,06h
mov dl,0ah
int 21h; перевод на новую строку
pop ax
ret
new_string endp
;----------
main endp
code ends
data segment
what_to_do db \'1.Удаление 2.Создание файла $\',0dh,0ah
del_good db 0dh,0ah,\'Удаление файла: $\'
make_good db 0dh,0ah,\'Создание файла: $\'
; colors db 27,\'[25;40m\';pink
; clrscr db 27,\'[2J\'
fname db 80 dup(\' \'),0
sendok db 27,\'[31;40m\',\'Файл удален !$\'
makeok db 27,\'[31;40m\',\'Файл создан !$\'
send_nofile db \'Такой файл не найден!$\'
send_noctlg db \'Такой папки нет!$\'
send_badchmod db \'Права доступа запрещают!$\'
data ends
stk segment stack
db 256 dup (0)
stk ends
end main