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

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).
RichardRussell

Re: Bug in BBC BASIC for Windows IDE

Post by RichardRussell »

RichardRussell wrote: Sat 25 Jul 2020, 17:42The 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%
RichardRussell

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.