Hello,
I'm new in assembly. I have to do a program that copies the data of an input file to an out put file. but this output file has to be created.
The problem is that I cannot create this file which seems to be so straight forward.
the Code i am using is
.model tiny
.data
outputfile db "newfile.txt",0
outhandle dw ?
.code
.stack
cseg segment 'code'
assume cs:cseg, ds:cseg
org 100h
start:
create_a_file:
mov dx, offset outputfile
mov cx, 0
mov ah, 3Ch
int 21h
mov outhandle, ax
jc error_routine
mov ah, 3Eh
mov bx, outhandle
int 21h
error_routine:
mov ax, 4c00h
int 21h
cseg ends
end start
I see the new file nowhere.Even when I specify the exact root folder like "c:\..."
I cant figure out what is going wrong.
Any help is appriciated, Thanx
PS: Im using windows XP 32-bit. and TASM (portable)