.386
.MODEL FLAT,STDCALL
locals
jumps

UNICODE=0

include w32.inc

extrn GetTickCount:proc

_wsprintfA PROCDESC WINAPI
_wsprintf TEXTEQU <_wsprintfA>

.DATA
;[--------==========================================================--------];
title1 db 'win uptime by Max', 0
szTime db "%lu hour(s) %-2.2lu minute(s) %-2.2lu second(s)",0
.data?
buffer db 64 dup (?)
hInstance dd ?
;[--------==========================================================--------];

.CODE

main:
Get_WINUPTIME:
call GetTickCount
mov ecx,1000
div ecx
xor edx,edx
mov ecx,60
div ecx
mov ebx,edx
xor edx,edx
div ecx
push ebx
push edx
push eax
push offset szTime
push offset buffer
call _wsprintf
xor eax,eax
call MessageBox,0,offset buffer, offset title1, 0
call ExitProcess,0

ends
end main
Posted on 2001-12-18 07:20:57 by Max