SmallBASIC

Last updated
SmallBASIC
Smallbasic-screenshot-3spiros.png
Stable release
12.23 (Windows/Linux/Android) [1] / August 31, 2021;8 months ago (2021-08-31) [1]
Implementation language BASIC
License GPL 3
Filename extensions .bas
Website smallbasic.github.io

SmallBASIC is a BASIC programming language dialect with interpreters released as free software under the GNU General Public License version 3 for Microsoft Windows, Linux and Android.

Contents

Description

The dialect is described by the authors as a second generation BASIC, and has a lot in common with QBasic. SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a string library, system, sound, and graphic commands along with structured programming syntax.

Intended application

The "Small" prefix in the name SmallBASIC reflects the project's original intention of being used with the Palm, a small hand-held device. SmallBASIC was designed for portability, and is written in C with separate modules containing any code that is unique to a particular platform. [2] [3]

SmallBASIC is intended to support the same sorts of applications supported by GW-BASIC and QBasic on the IBM PC, with support for drawing Graphic Primitives to the screen, creating sounds, String Manipulation, and displaying text in various fonts. SmallBASIC also adds functions such as "File Save", "Save As", "Close File", and "Open File" to the Palm, a device with no native filesystem. SmallBASIC is also intended as a tool for mathematics, with built-in functions for Unit conversion, Algebra, Matrix math, Trigonometry, Statistics, and for two and three dimensional Equation Graphing. [2] [3]

History

SmallBASIC was designed to run on minimal hardware. One of the primary platforms supported was Palm OS, [4] where memory, CPU cycles, and screen space were limited. The SmallBASIC graphics engine could use ASCII graphics (similar to ASCII art) and therefore ran many programs on pure text devices. SmallBASIC runs even on Palm OS wristwatches made by Fossil, Inc.

Platforms

SmallBASIC is available for all POSIX-Compliant operating systems (including Linux, BSD, and UNIX), [5] DOS/DJGPP, [6] Win32, [7] FLTK, [8] VTOS, [8] Franklin eBookMan, [9] Cygwin/MingW, [10] Helio/VT-OS, [11] Android, [12] the Nokia N770 Internet Tablet., [13] and on any system that supports SDL, FLTK, SVGALib, Linux framebuffer, or Windows GUI.

Syntax

The syntax of SmallBASIC has a lot in common with QBasic. Line numbers are not required, and statements are terminated by newlines. Multiple statements may be written on a single line by separating each statement with a colon (:)

An example "Hello, World!" program is:

PRINT"Hello, World!"

An example of how SmallBASIC allows to load an image file and display the image:

I=IMAGE("image_name.png")'Loads a png fileI.SHOW(100,100)'shows the image on screen at the coordinates 100,100

Loadable modules

External modules can be written in C to extend the functionality provided by SmallBASIC. [14] Since version 12.20 modules for Raylib, Nuklear and WebSockets are included in the release. [15] Additionally a loadable module to access the GPIO connector of the Raspberry Pi exists. [16]

Reception

See also

Related Research Articles

Blitz BASIC

Blitz BASIC is the programming language dialect of the first Blitz compilers, devised by New Zealand-based developer Mark Sibly. Being derived from BASIC, Blitz syntax was designed to be easy to pick up for beginners first learning to program. The languages are game-programming oriented but are often found general-purpose enough to be used for most types of application. The Blitz language evolved as new products were released, with recent incarnations offering support for more advanced programming techniques such as object-orientation and multithreading. This led to the languages losing their BASIC moniker in later years.

Z shell Unix shell

The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.

Dillo Minimal, lightweight web browser

Dillo is a minimalistic web browser particularly intended for older or slower computers and embedded systems. It supports only plain HTML/XHTML and images over HTTP; scripting is ignored entirely. Current versions of Dillo can run on Linux, BSD, OS X, IRIX and Cygwin. Due to its small size, it is the browser of choice in several space-conscious Linux distributions. Released under the GNU GPL-3.0-or-later, Dillo is free software.

CinePaint Free software for painting and retouching bitmap frames of films

CinePaint is a free and open source computer program for painting and retouching bitmap frames of films. It is a fork of version 1.0.4 of the GNU Image Manipulation Program (GIMP). It enjoyed some success as one of the earliest open source tools developed for feature motion picture visual effects and animation work. The main reason for this adoption over mainline GIMP was its support for high bit depths which can be required for film work. The mainline GIMP project later added high bit depths in GIMP 2.9.2, released November 2015. It is free software under the GPL-2.0-or-later. In 2018, "CinePaint 2.0 Making Progress" post announced progress, but years later that version isn't out.

Compiere is an open-source ERP and CRM business solution for Small and Medium-sized Enterprises (SME) in distribution, retail, service and manufacturing. Compiere is distributed by Consona Corporation and through a Partner Network, who are a collection of trained and authorized business partners.

GNU GRUB Boot loader package

GNU GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Free Software Foundation's Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.

Bochs

Bochs is a portable IA-32 and x86-64 IBM PC compatible emulator and debugger mostly written in C++ and distributed as free software under the GNU Lesser General Public License. It supports emulation of the processor(s), memory, disks, display, Ethernet, BIOS and common hardware peripherals of PCs.

VLC media player Free and open-source media player and streaming media server

VLC media player is a free and open-source, portable, cross-platform media player software and streaming media server developed by the VideoLAN project. VLC is available for desktop operating systems and mobile platforms, such as Android, iOS and iPadOS. VLC is also available on digital distribution platforms such as Apple's App Store, Google Play, and Microsoft Store.

FontForge Font editor created by George Williams

FontForge is a FOSS font editor which supports many common font formats. Developed primarily by George Williams until 2012, FontForge is free software and is distributed under a mix of the GNU General Public License Version 3 and the 3-clause BSD license. It is available for operating systems including Linux, Windows and macOS and is localized into 12 languages.

TortoiseSVN

TortoiseSVN is a Subversion client, implemented as a Microsoft Windows shell extension, that helps programmers manage different versions of the source code for their programs. It is free software released under the GNU General Public License.

K9Copy DVD backup and authoring software

K9Copy was a free and open-source DVD backup and DVD authoring program for Unix-like operating systems such as Linux and BSD. Licensed under the GNU General Public License, K9Copy is free software.

The Environment Modules system is a tool to help users manage their Unix or Linux shell environment, by allowing groups of related environment-variable settings to be made or removed dynamically.

Salix OS Linux distribution

Salix OS is a multi-purpose Linux distribution based on Slackware.

<i>X-Moto</i>

X-Moto is a free and open source 2D motocross platform game developed for Linux, FreeBSD, Mac OS X and Microsoft Windows, where physics play an all important role in the gameplay. The basic gameplay clones that of Elasto Mania, but the simulated physics are subtly different.

GLtron

GLtron is a 3D snake game based on the light cycle portion of the film Tron. The game is free and open-source software and has been ported to many mobile and non-mobile operating systems such as Windows, MacOS, Symbian and Android over the years.

TeXstudio Editor/IDE for LaTeX

TeXstudio is a cross-platform open-source LaTeX editor. Its features include an interactive spelling checker, code folding, and syntax highlighting. It does not provide LaTeX itself – the user must choose a TeX distribution and install it first.

Nanolinux

NanoLinux is an open source, free and very lightweight Linux distribution that requires only 14 MB of disk space including tiny versions of the most common desktop applications and several games. It is based on the Core version of the Tiny Core Linux distribution and uses Busybox, Nano-X instead of X.Org, FLTK 1.3.x as the default GUI toolkit, and SLWM. The included applications are mainly based on FLTK.

Art of Illusion

Art of Illusion is a free software, and open source software package for making 3D graphics.

References

  1. 1 2 "Browse Files for SmallBASIC". 31 August 2021. Retrieved 14 November 2021.
  2. 1 2 3 "About SmallBASIC". ASCII-World. 22 February 1999. Archived from the original on 12 November 2007. Retrieved 19 January 2011.
  3. 1 2 3 PalmOS Hosted Programming Languages: Using the Palm as a Development Environment
  4. Freshmeat.net: Editing text on PalmOS using SmallBASIC.
  5. "SourceForge.net Repository - Unix". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  6. "SourceForge.net Repository - DOS-DJGPP". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  7. "SourceForge.net Repository - WIN32". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  8. 1 2 Gordon McComb (2002). Robot builder's sourcebook . McGraw-Hill Professional. p.  411. ISBN   0-07-140685-9 . Retrieved 19 January 2011. SmallBASIC.
  9. "SourceForge.net Repository - EBM". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  10. "Sigwin/MinG". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  11. "SourceForge.net Repository - Helio". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  12. "SourceForge.net Repository - Android". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  13. "SmallBASIC - N770 at". Sourceforge.net. Retrieved 2011-01-22.
  14. "SmallBASIC plugins" . Retrieved 22 March 2022.
  15. "SmallBASIC Home Page" . Retrieved 22 March 2022.
  16. "SmallBASIC PiGPIO Home Page" . Retrieved 22 March 2022.
  17. McPherson, James (4 June 2001). "Development in the palm of your hand, part 2". Articles.techrepublic.com.com. Archived from the original on 4 September 2012. Retrieved 19 January 2011.