Message board for the users of flat assembler.
> Compiler Internals > Signed numbers, calculator, fasm code
Hi the board.
Working over a routine or making some calculations i use fasm's calc in some cases to recheck myself.
It's boring much that it does not support unsigned qword operations(division, e.g.).
A "sign" & "unsign" directives could have solved the problem.
That way fasm, to my mind, would have to inform user about sign mode changes through "display" directive.
So that user avoided lot of cry.
Tomasz, set calc's font to ASMEDIT's, please.
Tomasz, open "exprcalc.inc", line ~930, optimize-able for size.
Partial snippet given only.
xor ebx,ebx ;) cmp dword [edi],0 ;here jne divider_ok cmp dword [edi+4],0 ;here jne divider_ok cmp [next_pass_needed],0 ;here je value_out_of_range jmp div_done divider_ok: bt dword [esi+4],31 ;here cmp dword[esi+4],ebx jnc div_first_sign_ok ; js not dword [esi] not dword [esi+4] add dword [esi],1 adc dword [esi+4],0 ;here ... ;there
|24 Nov 2010, 08:32||
not dword [esi] not dword [esi+4] add dword [esi],1 adc dword [esi+4],0
not dword[esi+4] neg dword[esi] adc dword[esi+4],0 ;ebx
|24 Nov 2010, 08:45||
I've also seen a lot of little things like that !
But I think Tomasz does not favor the size,
but rather to maintain readability.
It is more difficult to change a optimized code ...
and less easy to understand it after a while!
I like much to optimize my code to the maximum,
but sometimes i waste a lot of time to understand it again after a long time.
|24 Nov 2010, 11:27||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.