Re: Formatting in assembly
- From: "Eman" <e!m!a!n@xxxxxxxxxxx>
- Date: Sun, 2 Apr 2006 12:28:20 +0400
"?a\/b" <al@xxx> wrote in message news:1u1v22lpc9dvk0q2ms2ed14eokebrs8u7u@xxxxxxxxxx
On Sun, 02 Apr 2006 03:38:47 -0400, Frank Kotler
<fbkotler@xxxxxxxxxxx> wrote:
i
if you say
mul dword[dieci] ; in ci +/-oo
jc .ci
it is wrong because dieci==10, edx==0
so i have edx:eax=10*eax
and i have to see if edx!=0 (error)
not the overflow of assembly "mul" (multiplication is not intended
overflow never here for assembly instruction "mul")
Perhaps you can tell us what those flags *are* for?
what flag?
Here is the citation of MUL' description from "IA-32 Intel Architecture
Software Developer's Manual Volume 2A: Instruction Set Reference, A-M"
--
The result is stored in register AX, register pair DX:AX, or register
pair EDX:EAX (depending on the operand size), with the high-order bits
of the product contained in register AH, DX, or EDX, respectively.
If the high-order bits of the product are 0, the CF and OF flags are
cleared; otherwise, the flags are set.
--
There is no "intented" sense here,
just the specification of the CPU vendor.
The fragment
mul ...
cmp edx,0
jne .ci
can be replaced with
mul ...
jc .ci
since your next line' code and .ci' code ain't
depend on ZF/CF/OF/...
.
- Follow-Ups:
- Re: Formatting in assembly
- From: ¬a\\/b
- Re: Formatting in assembly
- References:
- Re: Formatting in assembly
- From: ¬a\\/b
- Re: Formatting in assembly
- From: Herbert Kleebauer
- Re: Formatting in assembly
- From: Eman
- Re: Formatting in assembly
- From: Herbert Kleebauer
- Re: Formatting in assembly
- From: ¬a\\/b
- Re: Formatting in assembly
- From: Frank Kotler
- Re: Formatting in assembly
- From: ¬a\\/b
- Re: Formatting in assembly
- Prev by Date: Re: Formatting in assembly
- Next by Date: SpooK strikes black, errr, back arrrr well at least something.
- Previous by thread: Re: Formatting in assembly
- Next by thread: Re: Formatting in assembly
- Index(es):
Relevant Pages
|
Loading