BASIC Accelerator Ver. 2.1.1.5 (2018.09.19)     Formerly Paract BASIC

Summary

BASICAcc2 is a Full BASIC to Object Pascal translator.
Translated programs shall be executed using FPC + Lazarus.
This verision is applicable for Lazarus 1.6.4 ~1.8.4.

Note.
For some programs such as those which invoke themselves using DRAW WITH, or frequintly invoke ASK statements such as ASK PIXEL VALUE, Ver.1 is faster.
For programs where subprograms or functions have locally array varibables, or functions have array parametes, Ver.1 may be faster.
However, Ver.1 does not work on MAC OS 10.13 (and perhaps on OS 10.12).

Revision Histry

Ver. 2.0.0.0
Renamed from Paract BASIC.
Ver. 2.0.0.1
64 bit code generation enabled on Mac.
Ver. 2.0.1.0
Set to use SSE4.1 instructions on 64 bit.
Ver. 2.0.2.0
Fixed the bug on the INPUT stattement on inappropriate inputs.
Ver. 2.0.2.1
Fixed the fault that PAUSE may overtake preceeding PRINT statements.
Ver. 2.1.0.0
Fixed the bug that the system failed when two or more parallel activities simultaneously raised exceptions.
Corrected the behaivior of READ IF MISSING when DATA stataments have an incomplete number of items.
Corrected the behaivior of file input statements on exceptions raising.
Improved the accuracy of SIN and COS functions on decimal arithmetic.
Ver. 2.1.0.1
Corrected the incompatibility on MAT READ IF MISSING.
Ver. 2.1.0.2
Fixed the bug on that syntax error in a WHEN-IN block caused an access violation.
Ver. 2.1.0.3
Fixed the bug on 2.1.0.2 that EXLINE failed to be compliled.
Ver. 2.1.0.4
Fixed the fault on the precision of SIN and COS functions on the DECIMAL mode.
Rearranged the Option-Precision menu.
The value of Time Delay Before Drawing Start came to be saved.
Ver. 2.1.0.5
Fixed the bug on optimization of using real variables on Complex mode when unary minus operation exists.
Ver. 2.1.1.0
modulated program automatic correction.
Fixed the bug overwritng exisiting file elements did not raise an exception.
Fixed the bug SET WINDOW caused an error when it was executed just after a transformation of a picture.
Fixed the bug GSAVE raised an extra error.
Adjusted the behavior of STR$ functions on complex mode with DECIMAL BASIC.
Adjusted the behavior of SET BITMAP SIZE with Decimal BASIC Ver.8.
Ver. 2.1.1.1
“-B” added into the command line on compiling programs with modules.
The default value for Time Interval cahnged to 0.
Ver. 2.1.1.2
Fixed the fault that CHARACTER INPUT may overtake preceeding PRINT statements.
Re-Arranged the items in the SetUp Options Menu.
Ver. 2.1.1.3
Fixed the fault that array parameters of functions caused memory leak.
Ver. 2.1.1.4
Fixed the fault that CLOSE for an inactive channel caused an exception.
Ver. 2.1.1.5
Modified the behavior of CHARACTER INPUT NOWAIT.

Windows

Set up (Lazarus)

Download Win32 Lazarus1.8.4 and install it into the folder that has no space characters on its path name.
Lazarus Download (SourceForge)
Mirror
Mirror

Set up (BASICAcc2)

Download BASICAcc2112.zip from Decimal BASIC Open Source Project Download
BASICAcc2 should be extracted into a regular folder on which the user has write permission.
The name of the folder must not contain any space characters.
For example, Desktop may not be suitable. USB flush drives shall be suitable.
When the system is updated by overwriting, the OUTPUT folder must be cleared.
Afterward, execute BASICAcc2.exe, and set up two paths.
Click "Set Up" and select "Path".
"fpc path" is the path to the folder on which fpc.exe exists.
"Lazarus path" is the full path name of the folder "lazarus".

If you have installed win32 Lazarus + fpc 3.0.4 on C drive, the two paths are following.

C:\Lazarus\fpc\3.0.4\bin\i386-win32
C:\Lazarus

Note.
If you use 64 bit Windows, Lazarus win64 also can be used.
Lazarus Win64
Select Setup - Path menu to set Target CPU to 64bit and set the paths.
When you use lazarus-1.8.4-fpc-3.0.4-win64.exe, for instance, the fpc path is like as follows.
C:\lazarus\fpc\3.0.4\bin\x86_64-win64
However when cros-x86_64 add-on is installed to 32 bit Lazarus, the fpc path is same as the path to 32 bit fpc.

Note that FPC does not support 80 bit extended precision floating point arithmetic on Win64, power operation and some transcendental functions may perform inaccurate.
If you require accuracy on 64bit code, use Linux 64bit version.


Linux (i386)

Set up (fpc and Lazarus)

Download and install fpc 3.0.4, fpc-src 3.0.4 and Lazarus 1.8.4 from
Lazarus i386 RPM,
Lazarus i386 DEB.

Set up (BASICAcc2)

Download BASICAcc2112.tar.gz from Decimal BASIC Open Source Project Download.
This system must be installed into the folder on which the user has write permission.
When the system is updated by overwriting, the OUTPUT folder must be cleared.

Troubleshootings

Can't find unit fileutil
When you see this error, modify Lazarus Path on the SetUp menu.
Folders such as components and units are put on the folder that the Lazarus Path directs.
That may as follows.
/usr/lib/lazarus/0.9.30.4/
or
/usr/share/lazarus/1.0



Linux (x86_64)

Set up (fpc and Lazarus)

Download and install fpc 3.0.4, fpc-src 3.0.4 and Lazarus 1.8.4 from
Lazarus x86_64 RPM,
Lazarus AMD64 DEB.

Set up (BASICAcc2)

Download BASICAcc2112_linux64.tar.xz from Decimal BASIC Open Source Project Download.
This system must be installed into the folder on which the user has write permission.

Note.
On Cent OS 7, FPC 3.0.4 does not work properly. Try FPC 3.0.2 + Lazarus 1.6.4.
See Lazarus Forum


MAC(Intel) 

Set up(Xcode tools)

Install the Apple Developer Tools (or Xcode tools).

1.
install Xcode.
This can be done on Apple App Store, Xcode needs no pay but Apple ID reqiured.
2.
On the terminal, type following two commands.
sudo xcodebuild -license
After license terms are displayed, enter agree .
xcode-select --install
After this, command line tools shall be installed.

See Installing Lazarus on MacOS X.
See also Installing Lazarus on Mac OS X - Free Pascal(PDF)
Note. BASICAcc2 does not require GDB. So you do not have to install GDB.

Set up(fpc and Lazarus)

Install FPC 3.0.4 and Lazarus 1.8.4, downloading from Lazarus Download

Set up (BASICAcc2)

Download BASICAcc2112.dmg from Decimal BASIC Open Source Project Download.
This system should be installed into the folder on which the user has write permission.
And the folder must not contain a space character. Note that when you use a USB drive, if it has a name such as "NO NAME", it must be renamed.
Note 1. Overwriting update is undesirable. Old files must be erased before update.
Note 2. On OS 10.9 or later, for the first time any program is compiled, click to execute NoName.app in the OUTPUT folder with Ctrl-key pressed.

Trouble Shooting
1. For the First Time
(1) Unabe to create file "/private/var/folders/0b ……  
Drag BASICAcc2 icon outside of BASICAcc2 folder, and then run BASICAcc2.
Once normally performed, BASICAcc2 icon can be retured into the original folder.
For details, search "App Translocation" on the internet.

(2) Empty ReportForm shown
If the first Run comannd yields empty ReportForm, this may caused by Unexecuted XCode license agreement.
On the terminal, run sudo xcrun cc and enter agree at the end.
(3) ReportForm shows PPU Source :synedit.pp not found.
Launch Lazarus IDE and select Package menu - Open Loaded packages.
And then Open and Compile the followings:
Synedit
Printer4lazarus

Known Faults
SET DRAW MODE (NOTXOR, MASK, MERGE, XOR) do not work.
MOUSE POLL statement does not work properly.
Printer SETUP does not work.
Behaviors of some graphics statements are no good as in Decimal BASIC Mac(Intel).

64bit
BASICAcc 2.0.0.1 or later can generate 64bit code, when "64bit" is set on Setup-Path menu.
For preparatory, launch Lazarus and follow the sequence as follows.
(1) Select "Project" and then "New Project", and select "Application".
(2) Select "Tools"-"Options"-"Environment"-"files", rewrite "Compiler Executable to "usr/local/bin/ppcx64".
(3) Select "Project" and then "Project Option", click "Config and Target",click "Select another LCL widgetset (macro LCLWidgetType)", click "Set " LCLWidgetType"" and then click "Value "cocoa"".
(4) Select "Run" menu and then click "Build".
(5) Select "Package" menu, select "Open Loaded packages" and then compile SynEdit.
            
            
(6) Again select "Package" menu, select "Open Loaded packages" and then compile Printer4Lazarus.
(7) Quit Lazarus.

 

Specifications

Language Specifications are in accordance with the Graphics module, the Real-Time module, the modules module, and the individual character input module of ISO Full BASIC , while statements related to PROCESS and TIMEOUT in SEIZE statments are not available.

Restrictions

On the following cases, GOTO statements and IF-THEN-line_number statements can not be executed.
branches from inside to outside of when-body (i.e. inside of WHEN~USE)
branches from inside to outside of a DO block that contains a protection block that contains a EXIT DO.
branches from inside to outside of a FOR block that contains a protection block that contains a EXIT FOR.

If a routine (or the main program) has a when-in block that has an exception-handler containing a GOSUB~RETURN subroutine, the routine can not have a GOSUB~RETURN subroutine that is not contained in any protection block.

Parameters of PROGRAM or CHAIN statements should be simple variables (Arrays not allowed).

Maximum length declaration for string variables is ignored. (no cut off done.)

Known Faults

EXTYPE,RETRY and CONTINUE do not work properly for exceptions raised in exception handlers.

DRAW MODE NOTXOR (MASK, MERGE, XOR),which are Decimal BASIC original enhancement, do not work properly.
On Mac, they are neglected. On Windows and Linux, then won't work until a PLOT LINES is executed.

Incompatibilities with Decimal BASIC

The decimal 1000 digit mode and the rational arithmetic mode, which Decimal BASIC has, are not avaialable.

The Microsoft BASIC compatible mode is not available.
Metafiles, OLE, ActiveX and CallBack functions are not available.

Character Encoding

The character encoding is UTF-8.
This is a problem when non-ASCII characters such as © , µ , ° , ± , Ä or Æ are used.
ORD-functions and CHR$-functions are defined under Unicode.
File I/O assumes the character encoding is UTF-8.
Executing a line like
SET #n: CODING "SYSTEM"
just after the execution of the OPEN-statement enables files of system default encoding to be read or written.
Even in such a case, the internal encoding remains to be UTF-8.
PRINT USING-statements and USING$-functions need the formatting characters as many as the byte length of the string.

If you want to manipulate byte files, you can change the internal character encoding to byte encoding by adding a line
OPTION CHARACTER BYTE
into each program unit, or change the setting of "Unit of string manipulation" to "byte" in the Option Compatibility menu.
In such a case, no ANSI encoded non-ASCII characters can be displayed on the screen.

UTF-8 encoding slows some string manipulation such as s$(m:n).
If you use only ASCII 7-bit characters, consider to change the "Unit of string manipulation" to "byte" in the Option Compatibility menu.

Program Encoding

Programs shall be encoded to the system default encoding on saving and decoded on loading.
That is, program files have compatibility with Decimal BASIC.
If you want programs to be saved and loaded remaining the character encoding UTF-8, change the Editor Option setting in the Option menu.

CHAIN statements

A CHAIN statement launches a file of extension ".BAS" with file association. The destination programs shall not be compiled.
No CHAIN or EXECUTE statement can have array parameters.

BREAK

Any BREAK statement will do, but it only breaks the program.

GOSUB

When GOSUB statements are used, each line must has a line number.

Bugs which Decimal BASIC has

Decimal BASIC has a fault that an internal procedure of the mainprogram can be invoked from an external procedure, but BASICAcc does not allow such a program.


About System

The executable file is generated as 'NoName.exe' or 'NoName' in the 'output' folder. This can be renamed and used for the destination of a CHAIN statement.


Copyright

This software is free software published under GPL.

If you noticed any bugs, report at
Forum of Decimal BASIC

© 2018 SHIRAISHI Kazuo


Decimal BASIC home page