Hi Everbody:
; REM SHOWTIM.ASM Tuesday, January 25, 2011 8:22 AM
; Author: Herge
; Location: Waterloo, Ontario, CANADA
.586
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.data
stm SYSTEMTIME<>
dateformat db " dddd, MMMM, dd, yyyy", 0
timeformat db "hh':'mm':'ss tt",0 ; Here
date_buf db 260 dup (0)
db 2 dup (0)
.code
start proc near
invoke GetLocalTime, addr stm; put Values in stm
invoke GetDateFormat, 0, 0, \
0, ADDR dateformat, ADDR date_buf, 260
; Print Date
invFor:
invoke GetDateFormat, 0, 0, \
ADDR stm, ADDR dateformat, ADDR date_buf, 260
mov ecx, offset date_buf
mov byte ptr [ eax + ecx - 1 ], ' ';replace null with space
add ecx, eax
; Print Time!
invPrt:
invoke GetTimeFormat, 0, 0, \
ADDR stm, ADDR timeformat, ecx, 20
invMess:
invoke MessageBox, 0, addr date_buf, addr date_buf, MB_OK
invX:
invoke ExitProcess, 0
start endp
end start
I have two computers with masm32 on them.
One does Not show the AM/PM in the message box even thou date_buf has
the correct bytes. I compiled on both computers and took code back and forth.
windbg says all is cool but still shows the wrong output. I get 3 dots in Title Bar.
This computer is having problems with search.
Any Ideas ?
or suggestions.
Regards herge