Eeek.
Nowadays, next to no one programs in assembler, because programs typically run under Windows. Strangely, even for command line linux I have rarely seen assembler.
File handling (this works with software interrupts in assembler) is a little tricky.
Here is my suggestion:
Program the whole thing in C/Pascal/Basic and rest assured that computers nowadays do that at reasonable speed.
or:
Do all the file handling in C, and do the time critical stuff in assembler. You can place assembler code directly in C code, if I am not completely wrong with asm{}, maybe it was #asm (as a compiler directive)...
C compilers these days will likely producer better assembler code than you if you do it for the first time.