flat assembler
Message board for the users of flat assembler.

Index > Main > flat assembler 1.69.41-42

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7737
Location: Kraków, Poland
Tomasz Grysztar
I released this new version in a development line at first, because it has some extensive changes to the assembler's internal engine - they should not affect most the of sources, however it is possible that I inadvertently introduced some bugs. Also, as this revision fixes a number of bugs that could be sometimes (mis)used by the programmers, it is possible that some source will cease to assemble because of it.

The changes may not sound like much, and most of you will perhaps not even notice that something is different, but it required a lot of work to tweak the internals in order to get this working, and I'm quite satisfied that I finally managed to correct one of the serious fasm's flaws.

What has been done? I have finally implemented the 65-th precision bit for expression calculator engine, and thanks to this addition I was able to correct many of the behavior that I disliked. The new engine is able to distinguish large numbers in unsigned 64-bit range from the negative numbers in signed 64-bit range, and thus it is able to correctly detect overflows on addition and subtraction (and also "shl"). It also able to multiply and divide in the full composite range.

Another consequence is that expressions for QWORD size now behave consistently with values of other sizes. For example:
Code:
B = byte -1     ; defines 0FFh constant (positive number)
W = word -1     ; defines 0FFFFh constant (positive number)
D = dword -1    ; defines 0FFFFFFFFh constant (positive number)
Q = qword -1    ; defines 0FFFFFFFFFFFFFFFFh constant (positive number)
X = -1          ; defines -1 constant (negative number)    
With earlier fasm versions "qword" override had no such effect (since fasm was not able to distinguish that large positive number from -1 constant).

The changes also had to be applied to "fas" file format, its documentation has been updated. I also added a concise paragraph to the fasm's manual, which describes what results should you expect from the fasm's expression calculator.


Last edited by Tomasz Grysztar on 05 Mar 2012, 20:33; edited 1 time in total
Post 01 Mar 2012, 21:41
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> I have finally implemented the 65-th precision bit for expression calculator engine

COOOOOOOOOOOOOOL Smile

> I release this new version

It's available but hidden: http://flatassembler.net/download.php Smile

Quote:

flat assembler 1.69.40 for DOS
size: 333 kilobytes
last update: 24 Feb 2012 17:00:09 UTC


What's new:

* see ^^^ above
* updated calculator in the IDE too (untested)
* increased bloat by almost 1 KiB
* made 69.39 deprecated
Post 03 Mar 2012, 08:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17349
Location: In your JS exploiting you and your system
revolution
DOS386 wrote:
It's available but hidden: http://flatassembler.net/download.php
Scroll down.
Post 03 Mar 2012, 08:16
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Image

minimal test: seems to work, calculator passes my $FFFF'FFFF'FFFF'FFFF-test (while older versions securely fail it), some code compiles (more not tested), TFM is updated too (but isn't the "infinite precision" a bit too optimistic for 65 bits ?) Smile
Post 04 Mar 2012, 07:32
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7737
Location: Kraków, Poland
Tomasz Grysztar
DOS386 wrote:
(but isn't the "infinite precision" a bit too optimistic for 65 bits ?) Smile
The use of "infinite precision" phrase there means that fasm gives the results that are the same as the ones it would give, if it operated on truly infinite precision - and if it is not able to ensure that the result is as such, it signals the overflow error.

This is designed with possibility of future improvements in mind - for example if there is fasm 2.0 with 129-bit calculator engine, it will be able to operate give the correct results for larger values, but for the expression which even 65-bit fasm is able to calculate they will both give the same results, so this will ensure compatibility. It also makes it possible to predict the results of calculations without any knowledge about what precision assembler uses internally in given implementation - as long as the implementation is capable of computing the particular expression for you, the result should be the same as if it was given with arbitrary precision implementation.
Post 04 Mar 2012, 17:51
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Code:
version 1.69.42 (Mar 05, 2012)

[-] A couple of minor bugfixes has been made in formatter module, related to
    the recent rearrangement in expression handling.
    


a (no longer) silent update Mar-8 ?

What's new:

* see above
* substantial optimizations reducing bloat by over 1 KiB Smile
* split Win32 binaries into sections (I never had had virii anyway)
* deleted both 40 and 41 versions
Post 09 Mar 2012, 15:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.