I have a trouble on checking if the overflow flag is set after the user enter a unsigned number
I tried using the JC to check the overflow flag.
Example output
Please enter an unsigned number: 99999999999999999999999
<32-bit integer overflow>
Not unsigned or too big.
Please enter an unsigned number: 25
25
prompt_1 BYTE "Please enter an unsigned number: ", 0
inv_msg BYTE "Not unsigned or too big.", 0
inv_prompt BYTE "Please try again: ", 0
input_1 DWORD ?
.code
main PROC
Try_again:
mov edx, OFFSET prompt_1
call WriteString
call ReadInt
jo Invalid_
mov input_1, eax
call WriteDec
jmp Finish_
Invalid_:
mov edx, OFFSET inv_msg
call WriteString
call Crlf
jmp Try_again
Finish_:
It seems work but it keep showing <32-bit integer overflow>. Does it work as normal or something goes wrong? Are there any way to stop displaying <32-bit integer overflow> or is this how it's suppose to be?
ReadIntnobody can answer.