BASIC Accelerator Ver. 1.0.4 (2017.06.05)

Summary

BASICAcc is a Full BASIC to Object Pascal translator.
Translated programs shall be executed using FPC + Lazarus.
Numbers are double precision floating point, not decimal.
Numerical operation shall be considerably faster than Binary mode of Decimal BASIC.
This verision is applicable for Lazarus 1.6.

To Update
If overwriten, delete all files in OUTPUT folder, except NoName.app for MAC .

Revision History
Ver. 1.0.3.0
Increased the maximum number of LOCATE VALUE silide bars.
Fixed the bug on execution of PRINT statemetns.
Fixed the bug on Find & Replace menus.
Ver. 1.0.2.0
Fixed the bug SET ZONEWIDTH could not have a variable in parameter.
Ver. 1.0.1.0
Fixed the bug on WAIT DELAY.
Adapted to FPC3.0.2+Lazarus1.6.4.
Ver. 1.0.0.0
Accelerated displaying text output of PRINT statements.
Modified SETUP OPTIONS.
Ver. 0.9.8.1
Revised the defect that the file name on the title bar did not change after SaveAs.
Ver. 0.9.8.0
Made applicable for Lazarus 1.6.
The default of OPTION CHARACTER was set to MULTIBYTE.
Ver. 0.9.7.0
Break menu was made validated on graphics outputs.
Ver. 0.9.6.7
Fixed the bug MAT CELLS statements ignored the ViewPort.
Fixed the bug SET POINTER statements with a IF-THERE or IF-MISSING clause could not be compiled.
Break menu was made validated on I/O.
Save menes were made available on the break state.
Ver. 0.9.6.6
Fixed the bug that EXTYPE might return a wrong value.
Ver. 0.9.6.5
Fixed the bug that a function that have an array parameter caused a system error.
Ver. 0.9.6.4
Fixed the bug File-Merge menu did not work.
Ver. 0.9.6.3
Modified so as to correspond to Decimal BASIC 7.7.2.
Ver. 0.9.6.2
Fixed the bug ASK PIXEL VALUE caused an error when a point out of the range was indicated.
Ver. 0.9.6.1
Modified so as to correspond to Decimal BASIC 7.7.1.
Ver. 0.9.6.0
Modified so as to correspond to Decimal BASIC 7.7.0.

Ver. 0.9.5.9
Modified to allow external procedures in a module to have local variables whose name coincide with the variables declared PUBLIC or SHARE in the module.


Windows

Set up (Lazarus)

Download Lazarus 1.6 and install it into the folder that has no space character on its path name.
Lazarus Download (SourceForge)
Mirror
Mirror

Set up (BASIC Acc)

Download BASICAcc1040.zip from Decimal BASIC Open Source Project Download
BASICAcc 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 is not suitable. USB flush drives shall be suitable.
When the system is updated by overwriting, the OUTPUT folder must be cleared.
Afterward, execute BASICAcc.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.0 on C drive, the two paths are following.

C:\Lazarus\fpc\3.0.0\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.6.0-fpc-3.0.0-win64.exe, for instance, the fpc path is like as follows.
C:\lazarus\fpc\3.0.0\bin\x86_64-win64

Note that FPC win64 does not support 80 bit extended precision floating point, some may perform inaccurate.


How to uninstall BASICAcc
Remove the whole folder in which BASICAcc has been installed.


Linux (i386)

Set up (fpc and Lazarus)

Download and install fpc 3.0.2, fpc-src 3.0.2 and Lazarus 1.6.4 from
Lazarus i386 RPM,
Lazarus i386 DEB.

Set up (BASIC Acc)

Download BASICAcc1040.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.2, fpc-src 3.0.2 and Lazarus 1.6.4 from
Lazarus x86_64 RPM,
Lazarus AMD64 DEB.

Set up (BASIC Acc)

Download BASICAcc1040_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.


MAC(Intel) 

Set up(Xcode tools)

Install the Apple Developer Tools (or Xcode tools).
In case of OS 10. 7 or later, optional Command Line Tools must be contained.
See Installing Lazarus on MacOS X.
See also Installing Lazarus on Mac OS X - Free Pascal(PDF)
Note. BASICAcc does not require GDB. So you do not have to install GDB.

Set up(fpc and Lazarus)

Install FPC 3.0.2 and Lazarus 1.6.4 according to Installing Lazarus on MacOS X,
downloading from Lazarus Download

Set up (BASIC Acc)

Download BASICAcc1040_Mac.zip 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) 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.
(2) 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
(3) NoName can't be opened because it is from anunidentified developer.
Right-click (or control-click) Noname.app in the OUTPUT folder and choose “Open.”

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).



Specifications

Language Specifications are in accordance with the Graphics module, the modules module, and the individual character input module of ISO Full BASIC , while the following are not available.
OPTION ARITHMETIC DECIMAL

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.)

Incompatibilities with Decimal BASIC

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.

Known Faults

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.

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

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


About System

The executable file is generated as 'NoName.exe' 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
Decimal BASIC Open Source Project Open Discussion Forum

© 2017 SHIRAISHI Kazuo


Decimal BASIC home page