Message board for the users of flat assembler.
> IDE Development > [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 ).
Of course this would be most notably useful for DOS usually not having a (sufficiently "big" ...) calculator already present and usable in the background).
dq ((1234567890*234567890) SHL 2) * 7
Code ^^^ gives the result also but silly and pollutes the HD with 2 files
EDIT 2009-10-31 : added "Done!" status
Last edited by DOS386 on 30 Oct 2009, 03:32; edited 1 time in total
|11 Jan 2009, 15:04||
Tomasz wrote (here) :
but nevertheless indeed added the calculator in 1.67.09 (core, no version number of the DOS IDE) (see shot) - Thank you
It works very well, I was unable to crash it so far (FYI, the calculator in FreePASCAL IDE TripleFault's if you overflow it )
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 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 ), so numbers like "FFFFFFFFFFFFFFFh" are virtually impossible to "decrypt"
- (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.
Bug Nr.: 12345
Title: Hello World program compiles to 100 KB !!!
Status: Closed: NOT a Bug
|30 Oct 2009, 03:31||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.