flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > JG vs JA .... bug :-( |
Author |
|
DOS386 04 Feb 2007, 18:52
I finally found a bug in my code: used JNG instruction and did not work.
Why ? JNG seems to perform a signed comparison. FASM.TXT unfortunately does NOT contain any info about possible sign http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH06/CH06-5.html#HEADING5-226 Here ^^^ ( MA$M ) I found the truth The text maybe should be updated to warn from this fact _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
04 Feb 2007, 18:52 |
|
vid 04 Feb 2007, 19:32
i agree, there should be some note in manuals that "above" and "below" means unsigned and "greater", "lesser" means signed.
|
|||
04 Feb 2007, 19:32 |
|
vid 04 Feb 2007, 20:14
it is not easy to figure out from condition, especially not from beginner. there is also a description of what name means, and "above" vs. "greater" are not that descriptive. just a sentence:
In conditional jump names, "above" and "below" refers to result of unsigned operation, "greater" and "lesser" to signed. warning about processor manuals and some hints where to find them is good idea. |
|||
04 Feb 2007, 20:14 |
|
DOS386 07 Feb 2007, 00:47
Quote: exact condition "(SF xor OF) or ZF = 1" YES, but the sign is not really obvious ... Quote: fasm's instruction set manual was intended to document the syntax for each possible instructions settings, and some hints about what the instructions do were just a small addition, I consider this more than enough. The syntax manual was never intended to replace the processor manual, and I recall that I stated something abou it in the introduction to the chapter about x86 instruction set. Perhaps I should replace it with a capitalized warning Rather some more info about the instructions should be added. YES, there is a HUUUGE amount of manuals, but they all are based on MA$M , adding the low amount of missing stuff into FASM manual: Quote: In conditional jump names, "above" and "below" refers to result of unsigned operation, "greater" and "lesser" to signed. , warns about CPU compatibility and Privilege ("This instruction is privileged and supported starting from P2") , and the numbers syntax (as far as I found out so far) would obsolete the need for additional instruction manuals. Finally, this manual could be included into the IDE _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
07 Feb 2007, 00:47 |
|
rugxulo 07 Feb 2007, 13:35
NTOSKRNL_VXE wrote:
Well, if you're like me, you have NASM too, and its manual does describe this (well, not x86-64, but I don't have that kind of cpu anyways). Quote:
|
|||
07 Feb 2007, 13:35 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.