Raspberry BASIC

Recent Posts

Pages: [1] 2 3 ... 10
1
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on August 04, 2020, 11:36:43 AM »
I have updated the Console Mode editions of BBC BASIC to version 0.25.  The main changes in this version are:

  • Fixed a bug which caused the expected 'Type mismatch' error not to be reported on assigning a string to a numeric variable!
  • Minor changes to the actions of the Esc key and on reporting an untrapped error, to improve consistency with other versions of BBC BASIC.
  • Added some libraries in the lib/ directory (arraylib, classlib, datelib, fnusing, sortlib, stringlib, utf8lib, xmllib).

Version 0.25 may be downloaded from the usual place:

2
BBC BASIC / BBC BASIC for SDL 2.0 version 1.14a released
« Last post by Richard Russell on August 03, 2020, 10:01:17 PM »
I've released version 1.14a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS.  The changes in this version are as follows:

  • BASIC Interpreter / Run Time Engine

    Added a *DUMP command to list the contents of a file in hexadecimal and ASCII.

    Suppressed issuing an ON MOVE interrupt if the window size is reported as zero.

    Tweaked the 64-bit and ARM editions to improve compatibility with the 32-bit x86 editions, for example Ctrl+U in immediate mode now works as expected.

    Fixed a line-editing issue which affected only the Raspberry Pi, because its 'char' datatype is unsigned.

  • IDEs and Utilities

    SDLIDE: The links to the website in the Help menu now specify https:// to suppress security warnings from modern browsers.

    BBCEdit: Updated to version 0.36.2 (with thanks to Andy Parkes).

  • Libraries

    Modified filedlg.bbc so that the file-system root has only one trailing / or \.

    Modified dlglib.bbc so input focus isn't acquired by an invisible control, and so textboxes are initially scrolled fully left.

  • Example Programs

    Updated SkyBaby.bbc to allow editing (but not deleting) a Custom Place or Custom Object.

    Updated telstar.bbc to support direct cursor addressing using the APS command.

This new version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspbian, iOS and 64-bit Linux editions, currently).

Please remember that if you use the BBC2APK Android Application Generator you should download a new APK template to ensure that any updates to the run-time engine are incorporated in your own apps.
3
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on July 15, 2020, 08:30:14 AM »
I'm running Ubuntu 64 bit on my RPI 4B 4GB. Do you have a distribution for ARM 64 bit?

Sorry, no.  As you may know, 64-bit ARM compilers (e.g. GCC) are really peculiar in one respect: their 'long double' data type (which is what BBC BASIC uses as its default numeric type) doesn't correspond to any of the floating point types supported by the arm64's FPU but is a 128-bit extended-precision type implemented purely in software.  This breaks BBC BASIC in two ways: calculations are really slow, but more fundamentally I assume a 'long double' will fit in 10 bytes (as it does on an x86) rather than needing 16!

What's really annoying and (in my opinion) silly is that there's no GCC compiler switch to force 'long double' to be a synonym for 'double' as it is in all Microsoft's compilers.  That's what Apple's compiler does too, and is why a 64-bit ARM edition of BBC BASIC for iOS was possible whereas it currently isn't on other 64-bit ARM platforms.  Eventually I'll probably need to work around this issue by changing all my 'long double' type declarations to a user-defined type which can be #typedef'd to mean 'double' on ARM64, but I've not done that yet.

Quote
Curious why your 8queens example seems out of sequence. The last results are in the middle rather than the last row.

It's not 'my' example, you'd have to ask its author.  I assume he's displaying the first twelve solutions on the first page, then the next 12 on the next page (without clearing in between) and so on.  As there are 92 solutions in all, the final 8 are shown on the last page, below which the last four from the previous group of 12 can still be seen.

As the program has been used as a sort of benchmark I expect he did not want to scroll the display, or clear it between one group of 12 and the next, because that could skew the execution time depending on the speed of clearing/scrolling.
4
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by John Spikowski on July 15, 2020, 02:06:26 AM »
Hi Richard.

I'm running Ubuntu 64 bit on my RPI 4B 4GB. Do you have a distribution for ARM 64 bit?

Curious why your 8queens example seems out of sequence. The last results are in the middle rather than the last row.
5
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on July 03, 2020, 04:46:06 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.13.  The differences in this version are:

  • LISTIF is accepted (i.e. without a space, as other versions do).
  • RENUMBER now works even if only some lines are numbered.
  • New demo program 'chess.bbc' added (adapted from QBasic).
  • Demo program 'speed.bbc' modified to be more honest!

The updated version may be downloaded from the same place as before:

6
BBC BASIC / New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on June 28, 2020, 09:11:49 PM »
By popular request (well, three people!) I have created Console Mode editions of BBC BASIC for MacOS, Linux (64-bit), Windows (64-bit) and Raspbian (32-bit).  These have no graphics and no sound (nor do they support a mouse, joystick etc.) but their text-mode features are reasonably complete, so far as the capabilities of the native console/terminal allow (notably, text viewports are not supported).

You can think of them as BBC BASIC for SDL 2.0 with all the SDL stuff removed, and indeed that is effectively how they were created!  Their keyboard input is taken from stdin and their output is sent to stdout so you can use them for CGI applications or effectively as a replacement shell.  Normal shell commands can be issued by preceding them with a * in the usual BBC BASIC way.

These editions consist of compact self-contained executables with no dependencies on any third-party libraries; the BBC BASIC interpreter they contain is identical to that in BBC BASIC for SDL 2.0.  They should be considered as Beta test programs since they have not received extensive testing.  They are, of course, completely free and can be downloaded as follows:


Supplied with the executables are a small number of BBC BASIC demo programs. Here is the output from 8queens.bbc as seen in the Windows 10 console:
7
BBC BASIC / BBC BASIC for SDL 2.0 version 1.13a released
« Last post by Richard Russell on June 19, 2020, 04:36:14 PM »
I've released version 1.13a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS.  The changes in this version are as follows:
  • BASIC Interpreter / Run Time Engine

    Implemented VDU 23,18,3,n| to enable or disable alpha/graphics black and secondary character set in MODE 7.  It also 'fixes' the SAA5050 Hold Graphics bug.

    Implemented OSWORDs 139 & 140 (again!) to read and redefine the 'teletext' font (documented here).

    Reduced SOUND latency (which risks buffer underrruns on slow systems, but I hope is a better compromise).

    Setting bit 6 of *TEMPO changes the way the pitch envelope repeats to be more compatible with the BBC Micro (it's also now the default).

    Fixed a bug affecting 'scrolling' of one-row-high text viewports (64-bit and ARM editions only).

  • IDEs and Utilities

    SDLIDE: When loading an Acorn-format tokenised program, 2-byte tokens are automatically converted to their 1-byte equivalent (if any).

    SDLIDE: The file selector now uses smooth scrolling.

  • Libraries

    Added classlib for Object Oriented Programming, compatible with the BB4W library.

    Added mode7lib to support multiple character sets in MODE 7 (the primary and secondary character sets may be selected from English, German, Swedish, Belgian, Italian, Hebrew, Russian, Greek or US ASCII).

    Modified dlglib and filedlg to support smooth scrolling of listboxes.

  • Example Programs

    Added sortdemo.bbc (in examples/general) which is a graphical demonstration of six different sorting algorithms, adapted from a QuickBasic program.

    Added a page to mode7dem.bbc to demonstrate alpha/graphics black and the secondary character set.

    Tweaked bbclock.bbc to improve its reliability (previously it could misbehave after running for a few hours).

    Fixed telstar.bbc which was partially broken by the change of the MODE 7 font in v1.11a.

This new version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspbian, iOS and 64-bit Linux editions, currently).

Please remember that if you use the BBC2APK Android Application Generator you should download a new APK template to ensure that any updates to the run-time engine are incorporated in your own apps.
8
BBC BASIC / BBC BASIC for SDL 2.0 version 1.12a released
« Last post by Richard Russell on May 08, 2020, 05:18:29 PM »
I've released version 1.12a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS.  The changes in this version are as follows:
  • BASIC Interpreter / Run Time Engine

    Updated the MacOS edition (only) to SDL 2.0.12 to fix some graphical glitches.

    Enabled render batching in the iOS edition (deferred from 1.11a because of a compatibility issue).

    Improved the Windows edition's compatibility with the username containing non-ASCII characters.

  • IDEs and Utilities

    In the SDLIDE file selector, starting to type the wanted filename scrolls the listbox.

    Updated BBCEdit to version 0.34.2 (thanks to Andy Parkes).

    Updated touchide to support copying-and-pasting entire directories.

    Fixed a memory leak in SDLIDE's Compile utility.

    When SDLIDE is used with BBC BASIC for Windows the Compile utility now works (it calls the BB4W compiler).

  • Libraries

    Added the imglib library for rotating, scaling and flipping 2D images efficiently (a highly compatible library is also available for BBC BASIC for Windows).

    Modified the filedlg library so that starting to type the wanted filename scrolls the listbox.

    Added FN_utf8_to_ansi() and FN_ansi_to_utf8() functions to the utf8lib library.

    Fixed a bug in the box2dgfx library affecting non-zero y-origin values when PROC_gfxMatrix is used.

  • Example Programs

    Added bbclock.bbc (in examples/physics), a graphical Box2D simulation of a 'Ball Bearing Clock'.  This program is compatible with BBC BASIC for Windows if the Box2D libraries are installed.

    Added dunebuggy.bbc (in examples/physics), a Box2D demo of a vehicle with sprung suspension.  This program is compatible with BBC BASIC for Windows if the Box2D libraries are installed.

    Added kerning.bbc (in examples/general/) to demonstrate the effect of kerning.  This program is compatible with BB4W.

    Modified aliens.bbc to use the new imglib library; this also makes it compatible with BB4W, but without hardware acceleration it runs only slowly.

    Fixed a bug in SkyBaby.bbc affecting some editions (e.g. Android but not Windows), caused by a surprising anomaly in the 'asctime' and 'mktime' C runtime library routines.
This new version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspbian, iOS and 64-bit Linux editions, currently).
9
Other Languages / Re: Duktape JavaScript ECMAscript engine
« Last post by John Spikowski on April 14, 2020, 06:21:30 AM »
This looks like it might be a nice ScriptBasic extention module. I have a V7 JavaScript extension module but the library is now deprecated.

I believe Dave Zimmer the developer that did the ScriptBasic COM extension module also wrote a VB6 Ducktape extension.
10
Liberty BASIC / Re: About Liberty BASIC
« Last post by paulwratt on April 14, 2020, 05:13:10 AM »
As of 2017, OS/2 Warp 4 is now known as ArcaOS v5.0, so you may be interested in finishing that 0S/2 version of LibertyBASIC.

ArcaOS 5.1: https://www.arcanoae.com/arcaos/

interview: https://www.youtube.com/watch?v=8oXKMZ56R2o
review: https://www.youtube.com/watch?v=0PZE_swqO5U

POWER9: https://www.raptorcs.com/TALOSII/
Pages: [1] 2 3 ... 10