TipGiver
Programmer
- Sep 1, 2005
- 1,863
Hello,
I want some help on converting a signed dec to bin.
I'll use the div and not the idiv. The registers for the div are:
AH AL / 2 . After this the mod is in the AH and AL has either 0 or 1
How can I know that the entered dec by the keyboard (using the INT 21H, AH=07H) is positive or negative? Let's say that i'll enter a 2-digit dec so min values is -99 and max +99. The problem is that i want to get the number; the user can enter e.g +60 or 60 which are the same.
Thank you in advance for any tip, or any other way to do this
I want some help on converting a signed dec to bin.
I'll use the div and not the idiv. The registers for the div are:
AH AL / 2 . After this the mod is in the AH and AL has either 0 or 1
How can I know that the entered dec by the keyboard (using the INT 21H, AH=07H) is positive or negative? Let's say that i'll enter a 2-digit dec so min values is -99 and max +99. The problem is that i want to get the number; the user can enter e.g +60 or 60 which are the same.
Thank you in advance for any tip, or any other way to do this