Programming with FASM – the format ELF executable – part 004 .

The tutorial for today is a simple one.
I will show you how to delete the file created with in the last tutorial.
Let’s create a new file named delete_file.fasm and used to delete the new_file.txt.

In the file delete_file.fasm I used the int 0x80 and mov rax, 10.
The kernel is accessed using int 80h with delete function set with mov rax, 10.
Also, 64-bit x86 uses syscall instead of interrupt 0x80, see this webpage.
Let’s see the source code:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.