Back
-----------------------------------------------------------------
Subject: Readme file for large-integer arithmetic Basic library
Author : Sjoerd.J.Schaper
Date   : 06-06-2009
Code   : FreeBasic 0.20.0 (august 10, 2008)
-----------------------------------------------------------------

This version of the library will compile into a fast dll
with FreeBasic, a highly recommended 32-bit BASIC compiler
for dos, windows and linux.

Official site: http://www.freebasic.net/index.php/download

Compiles into a native FreeBasic dll by default.

To compile a Visual Basic-callable dll, first create the
"liblargeint.dll.a" import library, then include "-d __VB"
on the fbc command line. See file ".\more\make_vbdll.bat".

Do not use the "largeint.bat" and "copypack.bat" in the root,
as they are designed for the QB-library versions only.

1) Open the FB-customized "largeint.bat" in this directory
   and adjust the path to the FreeBasic compiler "fbc.exe".
2) Set the working directory with a "SET LARGEINT=some\directory"
   statement in "autoexec.bat" or use the "msconfig.exe" utility.
   If LARGEINT isn't in the environment, the current directory is used.
3) Finally run "makeall.bat" to copy and compile all files.
   Note: The batchfile won't process long directory names, so use
   "c:\progra~1\freeba~1" instead of "c:\program files\freebasic".


Usage of these big number modules is mostly self-explanatory, as they
prompt for the exact kind of input they expect. Zero input aborts
execution, in running programs use Ctrl-Break or Ctrl-c.

Instead of typing long sequences of digits at the prompt, preferably
redirect from input datafiles using batch programs. All results are
saved to disk, so data is quickly transferred by copying & pasting from
output to inputfiles. "makeall.bat" copies a bunch of sample templates
and batchfiles to the working directory.

Thus, each module is started from the working directory with a batchfile
of the same name. If an inputfile of the same name is also present, then
its data is redirected to the module. (All inputfiles are textfiles with
no extension.) To allow immediate input, simply rename or remove the
inputfile.

First of all, run "primflgs.bas". This module generates a compact,
encoded list of prime numbers below 2,900,000 used by library
function Nxtprm().

Before using the encoder / decoder set, create your own keys with
"genrator.bas", which writes all data necessary for modular
exponentiation to "public.key" and "private.key".

If you want to start coding with the library, you'll find do's & don'ts
and a short description of the task each routine is able to perform in
headerfile "largeint.bi".

When you recieve an "Out of environment space" message if you start
these batchfiles under Windows, find "system.ini" in your windir and
edit as follows: under the header [NonWindowsApp]
                 add the line     CommandEnvSize=1024
Reboot your computer for the change to take effect.

Good luck!

SourceForge.net logo