INT 21h / AH= 3Ch - create or truncate file.
entry:
CX = file attributes: mov cx, 0 ; normal - no attributes. mov cx, 1 ; read-only. mov cx, 2 ; hidden. mov cx, 4 ; system mov cx, 7 ; hidden, system and read-only! mov cx, 16 ; archive
DS:DX -> ASCIZ filename.
returns:
CF clear if successful, AX = file handle.
CF set on error AX = error code.
note: if specified file exists it is deleted without a warning.
example: org 100h mov ah, 3ch mov cx, 0 mov dx, offset filename mov ah, 3ch int 21h jc err mov handle, ax jmp k filename db "myfile.txt", 0 handle dw ? err: ; .... k: ret
That depends on the type of file and what you mean by "empty". Generally, fopen() called on an existing file, with the "w" option instead of the "a" option will truncate the file to zero length. To delete a file completely is a different process. Function truncate is your friend.
Yes.
my brother can truncate my computer
Is called Assembly.
what are the elements of assembly language programming?
Batch file programming is dos based programming you have to use dos commands .It is very good to perform some repetitive task in computer programming is easy you should only know the dos commands.
In order to build a two pass assembler a assembly programming language should support macro processing, file inclusion. Its definition should be independent of any particular hardware or operating system.
C and Assembly.
You can use COMMIT any time, but it is not necessary after TRUNCATE TABLE.
Truncate has many meanings depending on how it is used in a sentence. If it is used as a verb, truncate means to shorten something. If used as an adjective it means it stopped suddenly.
It are machine code and Assembly.
She had to truncate her story, so that it would fit into the five minute session.