Reza
Reza

Reputation: 33

Read and Write in File with Assembly MASM

I Want to Write and Read from file(.txt) in Assembly MASM (80X86 assembly) with "create" method in microsoft.com . Note That I Do not want to use "Interrupt". Thanks

Upvotes: 0

Views: 1287

Answers (1)

the accountant
the accountant

Reputation: 526

You "must" use the OS (windows in your case) API's to deal with the files , no matter witch language do you use, they all will eventually use the OS API's inside their implementations . but before that and as for assembly you will need to..

1- include the kernel32.inc file into your .asm source code(or prototype the function do you need to call).

2- make sure you included the kernel32.lib file into your linker input files.

3- then you can call the file API's like ReadFile or CreateFile

Upvotes: 1

Related Questions