I'm trying to read the file starting from the fifth byte but its not working for some reason
I know the problem is in the _seek
procedure because the code works without it but now with it
here's the code
%include "macro.asm"
section .data
filename db "first-names.txt"
section .bss
buffer resb 7
section .text
global _start
_start:
call _open
call _seek
call _read
call _print
exit
_open:
mov eax, SYSOPEN
mov edi, filename
mov esi, 0
mov edx, 0777
syscall
mov ecx, eax ;store fd
ret
_read:
mov edi, ecx
mov eax, SYSREAD
mov esi, buffer
mov edx, 7
syscall
ret
_print:
mov eax, SYSWRITE
mov edi, 1
mov esi, buffer
mov edx, 7
syscall
ret
_seek:
mov eax, SYSSEEK
mov edi, ecx
mov esi, 5
mov edx, 0
syscall
ret