Basinc 1.81 Update

This update addresses a long-standing bug that has appeared and disappeared across different versions since the original Basin.
The DEF FN command has always caused parsing issues for Basin. Its handling in memory is quite unusual: when the command is entered, a 5-byte buffer is created right after it within the BASIC listing. This buffer is used for internal DEF FN evaluations! Just imagine the complications this design can cause. It’s a rather curious design decision on the sinclair’s part.

Paul has put a lot of effort into dealing with DEF FN. My approach has always been “if it works, don’t touch it,” so I generally stayed away from it. However, this bug has kept resurfacing since the early versions of BasinC (as you can see if you check the different versions of the source code). Paul himself had rewritten and reverted this function several times at different stages.

Unfortunately, I noticed the DEF FN bug has returned in version 1.8. Now I understand that DEF FN parsing needs a complete rewrite. I added this to TO-DO list for future versions. This time, this is just a quick fix. In fact, the fix was already shared on the ZX Spectrum Discord server on June 6, 2025, and a few days later on Uwe’s Facebook BASIC group as version 1.81. Due to time constraints, I wasn’t able to post the announcement here—so I’m doing it now. As always, the updated source code is available on the GitHub page. Note that you can always ask for changes or fixed on the zx spectrum discord server, as it is the only real source of communication about BasinC. You can also reach me at @ardae.bsky.social‬

This version not only fixes DEF FN but also addresses another important issue: the new GOSUB locator was causing the cursor to jump up and down in Windows 11. That’s now resolved.
Since BasinC was originally compiled on Windows 7 for backward compatibility, certain behaviors varied. From now on, BasinC is compiled on Windows 10, and I will be dropping backward compatibility in upcoming versions. Hopefully, this will provide a more stable development environment.

⚠️ This update requires version 1.8 to be installed. If you haven’t installed it yet, you can download it from here:
Basinc 1.80 full install

🔄 To apply the 1.81 update, download the file below, go to your BasinC folder, delete the existing basinc.exe, and replace it with the new one from the archive:
Basinc 1.81 Update (1.2MB zipped exe file)


All changes in this update are listed below (including the ones introduced in 1.8, which I had forgotten to announce here at the time — you can always find this changelog inside the source code on GitHub):

// 1.81 — only released in ZX Spectrum Discord Server and retrojen.org 06.06.2025
// Added – Sysvars now can be sorted by clicking on the column headers
// Added – Memory Grab/Binary Grab window can now send data direcly to tape as a block
// Added – Assembler can now use pasmo assembler if pasmo.exe exist in the basinc folder
// Added – Memory Viewer – Copy to Clipboard right button popup menu
// Added – Custom Token Entry tab for Token Table Window (if you know what you are doing).
// Added – Show Keywords in Rem option to preview known keywords in a rem line (use custom token entry or shift+click on tokens on token table to insert keywords)
// Added – Subroutine list now shows destination when your cursor is on a gosub command
// Fixed – No longer accidental UI jumps when subroutine list is open
// Fixed – DEF FN parsing. Loading from a BAS file (ProcessBASLine), process DEF FN was called for every line. This was causing problems. Disabled this behaviour as program listing will get retokenized properly while repaint.

// 1.8 — Bumped version number because of visual lift.
// Added: Sub-Routine listing. mark subs manually with REM #subname or enable auto-detect subs to catch GO SUB ‘s
// Added: Online Help Option: Since Windows continuously marks the help file as unsafe, the Help File will be served online as an alternative.
// Fixed: Windows-XP archaic button panels are partly removed to provide more compatible graphics update.
// Changed: All internet update functionality is removed. Update Check just opens a browser now.

// 1.79.5 (skipped–never released)
// Added – Simple exception handler. Hope it catches nasty ones. build 94
// Added – Copy Bitmap to Clipboard option in Display Window > Edit menu. This copies whole screen including it’s border in actual zoom level.
// Added – Insert Print At, Peek, Plot, Draw, Circle and Rectangle commands in Display Window Right-click Popup Menu — These insert basic code to editor window
// Added – Font size selection for tool windows to make a little bit readable windows in hi-dpi screens. (requested by: lippmaje)
// Added – Refresh and Auto Refresh options in Memory Viewer tool window (requested by: lippmaje)
// Added – “Delete All” button in Watches Window to clear all watches at once.
// Added – New 8 editable colors for editor. See Options > BasinC > Syntax Highlighting [Colors] button.
// Added – Status bar at the bottom of the display window(will give some info)
// Added – Update check help menu item
// Added – Attach display window to main editor option. View > Display Window > Attach…
// Added – “Always keep on top option” for display window
// Added – Display window now has a status bar with lots of information.
// Added – Smart Indenting option in View Menu as it works much better now. Note that there is still a known cursor visibility bug while editing the code, harmless though.
// Fixed – “Rem speed N” rem command is now working better. Disable auto skip, Do not use GDI, use eg. hq2x.
// Fixed – Speed selection in Options wasn’t working properly due to sound emulation.
// Fixed – a very old bug, if you erase part of the edited line with DEL key, it would duplicate the line. (reported by: Uwe Geiken & lippmaje)
// Fixed – Tracing execution now follows focus for double and bigger editor fonts sucessfully
// Fixed – Importing a bas file or pasting a basic line with AT escape code was corrupting the color codes. (reported by: avlixa)
// Fixed – Data Array loading was failing when loading is performed from harddrive (reported by: ignacobo)
// Fixed – Sometimes Basin would lock up when the vars window was open (reported by: lippmaje)
// Changed – REM slow command now will reset cpu speed to default 3.5mhz.

Leave a Reply

Your email address will not be published. Required fields are marked *