flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > IDE Development > [Done!] Calculator for FASM IDE (most notably DOS ...)

Author
Thread Post new topic Reply to topic
DOS386



Joined: 08 Dec 2006
Posts: 1904

[Done!] Calculator for FASM IDE (most notably DOS ...)

.

Since FASM already does have an expression evaluator with full 64-bit math support in EXPRESSI.INC , it might be good and easily establishable idea to add a calculator to the IDE, just let the user enter a string, pass it to EXPRESSI.INC, and report result in HEX and DEC and BIN (71 digits for 64 bits bunched by 8 x 8 Shocked ).

Of course this would be most notably useful for DOS usually not having a (sufficiently "big" ...) calculator already present and usable in the background).


Code:

dq ((1234567890*234567890SHL 2) * 7 




Code ^^^ gives the result also but silly and pollutes the HD with 2 files Neutral

EDIT 2009-10-31 : added "Done!" status


Last edited by DOS386 on 30 Oct 2009, 03:32; edited 1 time in total
Post 11 Jan 2009, 15:04
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904

.

Tomasz wrote (here) :


Quote:








but nevertheless indeed added the calculator in 1.67.09 (core, no version number of the DOS IDE) (see shot) - Thank you Smile


Quote:

Other keys:
Ctrl+F6 calculator



It works very well, I was unable to crash it so far (FYI, the calculator in FreePASCAL IDE TripleFault's if you overflow it Laughing )

There are a few subminor issues:

- The MUL'ing routine is buggy or singed, since it works up to $7FFF'FFFF'FFFF'FFFF only

- Decimal output conversion is signed, numbers > $7FFF'FFFF'FFFF'FFFF getting negative ... oops has extra code for this effect Laughing well, OTOH input works up to 18'446'744'073'709'551'615 as supposed.

- There are no apo's in the results (in input they are accepted, see shot Smile ), so numbers like "FFFFFFFFFFFFFFFh" are virtually impossible to "decrypt" Very Happy

- (GOOD and BAD) : The calculator got its private set of output conversion routines. The good thing is the decimal 64-bit (with sign hack) one, superior to anything I've been aware so far. The bad thing is the still present very inefficient number_as_text routine, now additionally duplicate, that I had already whined about and fixed in my bunch of patches in my fork of 1.67.29 oops core, no version number of the DOS IDE.

Image

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 30 Oct 2009, 03:31
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.