flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
edemko 05 Mar 2010, 18:34
Never thought how fasm does number comparison.., it is signed.
b-a = 10b - 01b = 01b which is unsigned. All is fine. |
|||
![]() |
|
baldr 05 Mar 2010, 19:13
serfasm,
If b and a are signed, subtraction overflows and signed result is incorrect. If they are unsigned, b>a. |
|||
![]() |
|
edemko 05 Mar 2010, 20:05
Fasm should have his own flags register and some interface to access those. Poor Tomasz!
|
|||
![]() |
|
a115433 05 Mar 2010, 20:11
Never thought how fasm does number comparison.., it is signed.
b-a = 10b - 01b = 01b which is unsigned. All is fine. signed and unsigned differ only by flags checked. signed ops use SF and OF, unsigned use only CF. above/bellow - unsigned, greater/less - signed. Fasm should have his own flags register and some interface to access those. Poor Tomasz! fasm its just a link between you and cpu, it cant have anything. flags register is a part of CPU. anyway FASM is already broken in few places, because it use high level encoding. you cant encode eevry instruction with it, and its sad. |
|||
![]() |
|
edemko 05 Mar 2010, 20:34
sad
|
|||
![]() |
|
edfed 05 Mar 2010, 20:40
erf and lol.
fasm don't have its own flags. fasm is coded with fasm. it uses the X86 flags regicter inside your CPU. the code you compile with fasm does not differ to the code used to compile. it is all assembler. i don't see the use of this off topic subject. Last edited by edfed on 05 Mar 2010, 20:41; edited 1 time in total |
|||
![]() |
|
edemko 05 Mar 2010, 20:40
hll approach. BTW fasmd.asm compiles in 0.1 seconds as uses no macros, Delphi uses lot-a-lot high level "macro" but no speed consumption(background?).
|
|||
![]() |
|
edemko 07 Mar 2010, 23:22
baldr wrote: This problem looks similar to signed vs. unsigned contradiction: b = a+1 <- should fasm inform OF=1? |
|||
![]() |
|
a115433 07 Mar 2010, 23:29
> < are signed or unsigned?
of will be only when yoy cross sign boundary. for example, try to add something to (byte mode) 127, or substract something from -128. -128 + 1 = -127, OF = 0 -128 - 1 = 127, OF = 1 127 + 1 = -128, OF = 1 127 - 1 = 127, OF = 0 |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.