IsKeyPressed proc Key:DWORD
mov ecx, [dwKey]
movzx eax, byte [gKeys+ecx]
test eax, eax
sete al
ret
IsKeyPressed endp
InputCreate proc
push 256d
push GPTR ; memory is filled with 0's
call GlobalAlloc
push 27d
push IsKeyPressed
ret
InputCreate endp
Also, a word to the wise. Don't use MSVCRT in ASM, it completely destroys the purpose of using ASM. The converting is fairly easy too:
malloc -> GlobalAlloc
memset -> stosb/stosw/stosd/stosq