When multiplying 5 by 5, it gives not 25, but 1. What is the problem? Help me find it.

.data lpOut BYTE 4 dup (?) formatString BYTE '%4d',0 .code Main: mov ax, 5 mov bx, 5 mul bx push ecx invoke WriteConsoleA, hStdout, offset newLine, sizeof newLine, 0, 0 invoke wsprintfA, offset lpOut, offset formatString, eax invoke WriteConsoleA, hStdout, offset lpOut, sizeof lpOut, 0, 0 pop ecx end Main 
  • 2
    And the first WriteConsoleA accidentally register eax does not spoil? - Mike
  • Yes, for sure. Thank you very much - Vladyslav

0