-
Notifications
You must be signed in to change notification settings - Fork 3
/
SystemTime.asm
41 lines (32 loc) · 902 Bytes
/
SystemTime.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
%include "io.inc"
%include ".\common.inc"
extern _GetSystemTime@4
section .data
systime: istruc SYSTEMTIME
iend
section .text
global CMAIN
CMAIN:
mov ebp, esp; for correct debugging
lea eax, [systime]
push eax
call _GetSystemTime@4
;lea eax,
xor ebx, ebx
mov bx, [systime + SYSTEMTIME.wYear]
PRINTD "Year", bx
mov bx, [systime + SYSTEMTIME.wMonth]
PRINTD "Month", bx
mov bx, [systime + SYSTEMTIME.wDayOfWeek]
PRINTD "DayOfWeek", bx
mov bx, [systime + SYSTEMTIME.wDay]
PRINTD "Day", bx
mov bx, [systime + SYSTEMTIME.wHour]
PRINTD "Hour", bx
mov bx, [systime + SYSTEMTIME.wMinute]
PRINTD "Minute", bx
mov bx, [systime + SYSTEMTIME.wSecond]
PRINTD "Second", bx
mov bx, [systime + SYSTEMTIME.wMilliseconds]
PRINTD "Milliseconds", bx
ret