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).
Bug in BBC BASIC for Windows IDE
Re: Bug in BBC BASIC for Windows IDE
If you prefer not to edit the registry manually you can run this program to create the entry:RichardRussell wrote: ↑Sat 25 Jul 2020, 17:42The workaround is relatively straightforward: create a UsePrinter registry 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%
Re: Bug in BBC BASIC for Windows IDE
Yet another way of modifying the registry is to download and run this .reg file.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