I have searched: 13. sys_time Syntax: int sys_time(int * tloc) Source: kernel/time.c Action: get time in seconds
This system call has to return the time in seconds from 1970 into eax. My code:
section .text
global _start
_start:
mov eax, 13
mov ebx, 0
int 0x80
mov [time], eax
mov edi, dword 0
here:
mov edx, 1
mov ecx, time
add ecx, edi
add [ecx], dword 48
mov ebx, 1
mov eax, 4
int 0x80
inc edi
cmp edi, dword 100
jne here
mov ebx, 0
mov eax, 1
int 0x80
section .bss
time resb 100
But when I run this one I see the next: �L�000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
I just wanna get the date. If you know easier way just let me know this. Thanks.