Hello all, i am having trouble with a FindFirstFile int call, isn't that supposed to put the file name 1E offset to 80h in a com file ?? Or i am in a illusion that i can use this interrupt under win xp ?? Or it may be the fact that in windows it isn't put under DTA... is some one kind enough to point direction ??
Here is the code, i am trying to print the file name of the first matched file.
compiling withCode:c_seg segment 'code' org 100h assume cs:c_seg main proc far start_: mov ax, cs mov ds, ax mov es, ax file db "*.com", 0 mov ah, 4Eh mov dx, offset file mov cx, 0 int 21h jc quit_ mov cx, 13 mov bx, [80h + 1Eh] loop_1: mov ah, 02h mov dl, byte ptr[BX] inc BX int 21h loop loop_1 quit_: mov ah, 4ch int 21h main endp c_seg ends end start_
Code:tasm /m file_name.asm tlink file_name.obj exe2bin file_name.exe file_name.com




Reply With Quote