flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 06 Aug 2007, 22:13
mmm, lets clarify, you want to compare unsigned integers?
In such case your code is almost enough, just change jnge with jnae. The "above" and "below" are for unsigned comparisons and "lower" and "greater" for signed comparisons. |
|||
![]() |
|
FlashBurn 07 Aug 2007, 05:21
Thanks for your reply, it works now.
I´m now a assembly programmer for 7 years, but I had never problems with signed and unsigned integers. And now I know the difference between above/below and less/greater. |
|||
![]() |
|
Madis731 07 Aug 2007, 06:39
But why...
Code: cmp dword[amount_of_ram],0x800000 jnge .end_err Actually my approach to any problem is using UNsigned first and if absolutely neccessary - I will try to make it UNsigned - and if I can't... well, then I will use signed ![]() ![]() Btw, why make it so hard (I know the syntax and mnemonics allow this, but: Code: cmp dword[amount_of_ram],0x800000 jae .end_err ;or jnc .end_err Above or Equal means that RAM is at least 8MB (computer mega ![]() No carry means that it isn't less than 8MB which is also the same, but a little more complicated. Not greater and not equal ![]() ![]() I hope this clarified a bit. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.