ron2004
Newbie level 2
int 021h / ah = 4Eh
i want to create a prog.exe to copy directory that is compiled in turbo assembler.
my problem is the code that i search does not work properly here it is
ideal
dosseg
model small
stack 256
dataseg
dNa2 db '*.txt',00
dNa3 db 0
codeseg
start:
mov ax, @data
mov ds, ax
mov es, ax
xor ax, ax
mov ah, 04Eh ;search file for first text file
mov cx, 00000001b
mov dx, offset dNa2
int 021h
mov [dNa3], al ; get the file handle so ah=3Dh can use it
mov ah, 3Dh ;open file
mov al, 02h
mov dx, offset dNa3 ; mov dx, 9Eh is my other use of it
int 021h
exit:
mov ax, 04C00h
int 021h
the mov ah, 3Dh is cf = 1. it got error, my problem is i cant use the search
function "mov ah, 04Eh" for "mov ah, 3Dh" to open the file.
please help me.
i want to create a prog.exe to copy directory that is compiled in turbo assembler.
my problem is the code that i search does not work properly here it is
ideal
dosseg
model small
stack 256
dataseg
dNa2 db '*.txt',00
dNa3 db 0
codeseg
start:
mov ax, @data
mov ds, ax
mov es, ax
xor ax, ax
mov ah, 04Eh ;search file for first text file
mov cx, 00000001b
mov dx, offset dNa2
int 021h
mov [dNa3], al ; get the file handle so ah=3Dh can use it
mov ah, 3Dh ;open file
mov al, 02h
mov dx, offset dNa3 ; mov dx, 9Eh is my other use of it
int 021h
exit:
mov ax, 04C00h
int 021h
the mov ah, 3Dh is cf = 1. it got error, my problem is i cant use the search
function "mov ah, 04Eh" for "mov ah, 3Dh" to open the file.
please help me.