BASICAcc is a Full BASIC to Object Pascal translator.
Translated programs shall be executed using FPC + Lazarus.
Numerical operation shall be considerably faster than Binary mode of Decimal BASIC.
This version is applicable for Lazarus 2.2.6 ~4.2.

Revision History
Ver. 1.2.2.6
Fixed the bug that Editor Command Replace might cause Freezing.
Ver. 1.2.2.5
Greek characters and Chinese characters were made posible to compose an identifier.
Added matrix artithmetic and row or column operation in the MAT statement.
Ver. 1.2.2.4
Fixed the bugs about ASSIGN statements and CallBack Functions.
Ver. 1.2.2.3
Optimized DLL invoking, and adapted for CallBack procedures.
Adapted for Windows DPI Scaling.
Ver. 1.2.2.2 (2025/07/04)
Adapted for Linux(Arm) and Mac(Apple Silicon).
Ver. 1.2.2.1 Rev.2
Fixed the bug MAT WRITE did not work properly on RECTYPE CSV.
Ver. 1.2.2.1 Rev.1
Fixed the bug that DIRECTORY GETNAME terminated irregularly on Linux and Mac.
Ver. 1.2.2.1
Fixed the bug that file name having ' bloked to run the program.
Ver. 1.2.2.0
PLOT TEXT statments was modified to draw text in physical coordinates.
Initial beam mode was made to be "IMMORTAL".
Ver. 1.2.1.3 Rev.1
Fixed the falt on CONFIRM$, which was not invoked synchronously.
Ver. 1.2.1.3
Fixed the bug numeric variables were not initialied properly on the decimal mode.
Ver. 1.2.1.2 Rev.3
End of Line determined by default for true files.
Ver. 1.2.1.2 Rev.2
Fixed the fault that a numeric value was outputed without a trailing space in the Decimal mode.
Ver. 1.2.1.2 Rev.1
Fixed the bug on READ statements which read to string variables.
Ver. 1.2.1.2
Fixed the fault on the autoformat routine of the editor.
Ver. 1.2.1.1
Fixed the bug that MAT READ for interal files on the complex mode did not work.
Ver. 1.2.1.0
Fixed the fault that non-fatal exceptions were not reported.
Made intenal files serve on the complex mode.
Ver. 1.2.0.4
Fixed the fault that columns were not diplayed correctly.
Ver. 1.2.0.3
Add CDECL option to MOUSE POLL statements.
Fixed the fault that closing the child window yielded freezing or abnormal termination on Linux.
Increased the performance on MOUSE POLL statements on Linux.
Ver. 1.2.0.2
Fixed the bug LINE STYLE interfered PLOT AREA.
Ver. 1.2.0.1
Fixed the issues on printing.
Ver. 1.2.0.0
Fundamental part imported from Ver. 2.1
Program execution thread separated from the GUI thread .
Fixed the bug that MAT statements caused Access Violation when DEBUG ON and TRACE OFF.
Ver. 1.1.0.4
Modified the behavior of CHARACTER INPUT NOWAIT.
Ver. 1.1.0.3
Fixed the fault that CLOSE for an inactive channel caused an exception.
Ver. 1.1.0.2
Fixed the fault that array parameters of functions caused memory leak.
Ver. 1.1.0.1
"-B" added into the command line for programs with modules.
On generating 64 bit code, set to use SSE4.1 instructons if available.
Ver. 1.1.0.0
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.
Modulated automatic correction.
Ver. 1.0.4.1
Adjusted for Lazarus 1.8.0.
Ver. 1.0.4.0
Fixed the bug LOCATE VALUE(12) reflexed LOCATE VALUE(2).
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.
Download Win32 Lazarus and install it into the folder that has no space characters on its path name.
Lazarus Downloads
Download BASICAcc1226.zip.
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 may not be suitable. USB flush drives can 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.2.2 on C drive, the two paths are following.
C:\Lazarus\fpc\3.2.2\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.
Since FPC does not support 80 bit extended precision floating point arithmetic on Win64, Exponentiation, some transcendental functions, MAT INV statement and DET function or so may perform inaccurate.
If you require accuracy on 64bit code, use Linux 64bit version.
Download and install fpc 3.2.2, fpc-src 3.2.2 and Lazarus from
Lazarus x86_64 RPM,
Lazarus AMD64 DEB.
Download BASICAcc1226_Linux64.tar.xz.
This system must be installed into the folder on which the user has write permission.
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
Download Lazarus
Install FPC and Lazarus
Lazarus Download ARM64 DEB
Download BASICAcc
Download BASICAcc1226_Linux_ARM64.tar.xz
and then execute on the terminal
tar Jxfv BASICAcc1226_Linux_ARM64.tar.xz
Note.
ASSIGN statements work good. CallBack procedures are available.
As 80 bit extended float is not available, exponential or transcendental functions and matrix operations in MAT statements may be inaccurate.
Tested environment
Operation was tested on the following environments
Raspberry PI OS 64bit (Bookworm) used lazarus installed with sudo apt install fpc lazarus.
Download Lazarus
Install FPC and Lazarus with sudo apt install fpc lazarus.
Download BASICAcc
Download BASICAcc1226_Linux_ARM32.tar.xz
and then execute on the terminal
tar Jxfv BASICAcc1226_Linux_ARM32.tar.xz
Note.
ASSIGN statements work good. CallBack procedures are available.
As 80 bit extended float is not available, exponential or transcendental functions and matrix operations in MAT statements may be inaccurate.
Tested environment
Operation was tested on the following environments
Raspberry PI OS 32bit (Bookworm) used lazarus installed with sudo apt install fpc lazarus.
Install XCode Command Line Tools.
In the terminal, type
sudo xcode-select --install
sudo xcodebuild -license accept
Otherwise download "Command Line Tools for Xcode" from
Apple Developer .
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.
Install FPC 3.2.2 and Lazarus 3.8, downloading from
Lazarus Download
Download BASICAcc1226_Mac_Intel.zip.
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.
Trouble Shooting
1. For the First Time
(1) You may encounter the following
"BASICAcc.app" is damaged and can't be opened. you should move it to the Bin.
Then open the terminal at the folder where BASICAcc.app is located, and then type
xattr -rc BASICAcc.app
(2) Unabe to create file "/private/var/folders/……

Move BASICAcc icon
(BASICAcc.app) into the Application folder or another location, and then run BASICAcc.
Once normally performed, BASICAcc.app can be retured into the original folder.
For details, search "App Translocation" on the internet.
(3) For the first time, NoName must be executed by clicking with control-key pressed .
(4) 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.
(5) 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
(6) "do setup Lazarus Path" shown.
Select path on the setup menu, and then rewrite Lazarus path correctly.
Lazarus path is
Library/lazarus
on Lazarus 2.0.6, but it is
/Applications/Lazarus
on Lazarus 2.2.2 or later,
while lazarus path was
Developer/lazarus
on former versions.
(7) Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
When the above error occurs, show Setup- Options menu, and copy
-k-framework -kCocoa -k-weak_framework -kUserNotifications
and paste it into Addtional Compiler Options.
Known Faults
SET DRAW MODE (NOTXOR, MASK, MERGE, XOR) do not work.
MOUSE POLL statement does not work properly.
Behaviors of some graphics statements are no good as in Decimal BASIC Mac(Intel).
For Mac OS 15,
Download "Command Line Tools for Xcode 16.2 " from
Apple Developer .
16.3 or 16.4 are no good.
See also macOS 15.4 Breaks All Compiles
For OS 14 or earlier, in the terminal, type
sudo xcode-select --install
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.
Install FPC and Lazarus, downloading from
Lazarus Download
Download BASICAcc1222_Mac_ARM.zip.
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.
Trouble Shooting
1. For the First Time
(1) You may encounter the following
"BASICAcc.app" is damaged and can't be opened. you should move it to the Bin.
Then open the terminal at the folder where BASICAcc.app is located, and then type
xattr -rc BASICAcc.app
(7) Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
When the above error occurs, show Setup- Options menu, and copy
-k-framework -kCocoa -k-weak_framework -kUserNotifications
and paste it into Addtional Compiler Options.
Known Faults
As 80 bit extended float is not available, exponential or transcendental functions and matrix operations in MAT statements may be inaccurate.
SET DRAW MODE (NOTXOR, MASK, MERGE, XOR) do not work.
MOUSE POLL statement does not work properly.
Behaviors of some graphics statements are no good as in BASIC generic Mac(ARM).
Language Specifications are in accordance with the Graphics module, the modules module, and the individual character input module of ISO Full BASIC .
EXTYPE,RETRY and CONTINUE do not work properly for exceptrions raised in an exception handler.
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.
RETRY and CONTINUE do not work properly for exceptrions raised in exception handlers.
Parameters of PROGRAM or CHAIN statements should be simple variables (Arrays not allowed).
When an exception occurs while executing an INPUT or READ statement that has multiple variables, those variables remain all unchanged.
Maximum length declaration for string variables is ignored. (no cut off done.)SET #n: CODING "SYSTEM"OPTION CHARACTER BYTEs$(m:n).
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.
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.
Any BREAK statement will do, but it only breaks the program.
When GOSUB statements are used, each line must has a line number.
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.
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.
Any string variable assigned on a DLL as a workspace in an ASSIGN statement must be made ad hoc, for instance, using REPEAT$ function, which cannot be a string constant.
CallBack functions must be external procedures.
The Microsoft BASIC compatible mode is not available.
And more Metafiles, OLE and ActiveX are not available.
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.
This software is free software published under GPL.
If you noticed any bugs, report at
Decimal BASIC Bulletin board
© 2025 SHIRAISHI Kazuo