Alright, now I understand what you mean. The process pauses here, inside the WriteFile API:
Address Hex dump Command Comments
753212D5 /$ B8 02200000 mov eax, 2002 ; kernel32.753212D5(guessed Arg1,Arg2,Arg3,Arg4,Arg5)
753212DA |. B9 00000000 mov ecx, 0
753212DF |. 8D5424 04 lea edx, [esp+4]
753212E3 |. 64:FF15 C0000 call near fs:[0C0] ; <<<<<<<<<<<<<<<
753212EA |. 83C4 04 add esp, 4
753212ED \. C2 1400 retn 14
Here is a demo. Run it, press a key to start the output, then double-click the number and watch in Task Manager what happens with Cpu use.
include \masm32\include\masm32rt.inc
.code
start:
push eax ; create a slot on the stack
invoke GetConsoleMode, rv(GetStdHandle, STD_INPUT_HANDLE), esp
invoke SetConsoleMode, rv(GetStdHandle, STD_INPUT_HANDLE), ENABLE_EXTENDED_FLAGS or \
ENABLE_MOUSE_INPUT or \
ENABLE_QUICK_EDIT_MODE or \
ENABLE_LINE_INPUT or \
ENABLE_ECHO_INPUT or \
ENABLE_PROCESSED_INPUT or \
ENABLE_EXTENDED_FLAGS
push eax
invoke GetConsoleMode, rv(GetStdHandle, STD_INPUT_HANDLE), esp
pop ecx
print hex$(ecx), " is the new mode", 13, 10
pop ecx
inkey hex$(ecx), " is the old mode", 13, 10, "--- hit any key to start, then watch cpu use in Task Manager after selecting the number ---", 13, 10
push 999999
.Repeat
mov ecx, [esp]
print str$(ecx), 13
xor ecx, ecx
.Repeat
inc ecx
.Until Sign?
dec dword ptr [esp]
.Until Sign?
pop edx
exit
end start