Bug in BBC BASIC for Windows IDE

Discussions related specifically to the Windows, Linux (86), Mac OS-X and Raspberry Pi editions of BB4W and BBCSDL
RichardRussell
Posts: 399
Joined: Tue 15 Oct 2019, 09:10

Bug in BBC BASIC for Windows IDE

Post by RichardRussell »

As reported at the discussion group, a bug in the BBC BASIC for Windows IDE has been discovered. There is an uninitialised flags bit which means that there is a 50:50 chance that the default printer will not be enabled, causing statements like *HARDCOPY and the VDU 2 feature not to work unless you specify an explicit printer with *PRINTER.

The workaround is relatively straightforward: create a UsePrinter registry entry as documented here and set it to 01. This will force the flags bit to the correct state to ensure the printer is enabled (or if you prefer the printer not to be enabled, set it to 00).
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 399
Joined: Tue 15 Oct 2019, 09:10

Re: Bug in BBC BASIC for Windows IDE

Post by RichardRussell »

RichardRussell wrote:
Sat 25 Jul 2020, 17:42
The workaround is relatively straightforward: create a UsePrinter registry entry
If you prefer not to edit the registry manually you can run this program to create the entry:

Code: Select all

      KEY_ALL_ACCESS = &F003F
      HKEY_CURRENT_USER = &80000001
      REG_BINARY = 3
      UsePrinter& = &01

      Key$ = "Software\R T Russell\BBC BASIC for Windows\Settings"
      SYS "RegCreateKeyEx", HKEY_CURRENT_USER, Key$, 0, "", 0, KEY_ALL_ACCESS, 0, ^K%, 0 TO R%
      IF R% ERROR 100, "Couldn't create registry key"
      SYS "RegSetValueEx", K%, "UsePrinter", 0, REG_BINARY, ^UsePrinter&, 1
      SYS "RegCloseKey", K%
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 399
Joined: Tue 15 Oct 2019, 09:10

Re: Bug in BBC BASIC for Windows IDE

Post by RichardRussell »

RichardRussell wrote:
Sun 26 Jul 2020, 01:24
If you prefer not to edit the registry manually you can run this program to create the entry
Yet another way of modifying the registry is to download and run this .reg file.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.