The code below is only a small fraction of the program I am currently attempting to write, but no other parts of the program are relevant, so I only pasted what was necessary. A
One possible solution would be to replace inputLoopCounter BYTE -1 by inputLoopCounter DWORD -1.
inputLoopCounter BYTE -1
inputLoopCounter DWORD -1