A&B Computing


Questions & Answers

Categories: Letter

 
Author: Bruce Smith
Published in A&B Computing 1.11

Our specialist in solving the stickiest Beeb problems tackles your questions

Questions & Answers

My thanks to John Peters of Eastbourne for providing this month's instalment of undocumented error messages. John has found the answers to the two outstanding messages. He points out that the 'Key in use' error (ERR 250) occurs when a function key tries to redefine itself using a line such as *KEY 0 *KEY 0"SOMETHING ELSE"|MEXTRA

John points out also that there must be more text after the definition so that the key is still in use when the computer tries to redefine it.

It is believed that the 'No Filing System' error is only in the 0.1 OS and is generated when typing *NET or *ROM. Perhaps if anyone still uses the 0.1 OS they could try it out and let me know.

Well I think that just about covers all the available error messages... unless you know otherwise!


Q: Following last issues tip on tweaking down the sound on the Beeb by adjusting the volume preset. I have received a letter from John Zachar in Brackley who requested a solution to a similar problem but using either BASIC or the Operating System...

A: If you are using home-grown programs then 'turning' the sound volume down is quite simple as all it requires is an adjustment to the amplitude or loudness parameter. The amplitude parameter is the second on specified in the SOUND command, for example the amplitude of the command:

SOUND 1, -15, 100, 200

is -15. The amplitude of a sound may take any value between -15 and 4 inclusive. A value of -15 is the loudest. -7 is half volume and 0 is silence.

If all the SOUND commands in your program use a maximum amplitude value of -15 just edit a new lower and more pleasing amplitude value in.

On the other hand, if the sound is being produced by a commercial piece of software that you cannot get at, because it is protected there is no simple way out. The easiest solution would be to turn the sound off completely using *FX210,1. This call is the Read/Write sound suppression status call. All the time the location the call writes to contains 0 the sound output is enabled. By writing any other value to it disables the sound completely. Executing this call before loading your protected software should be music to your ears!

Q: Tina Evans of Islington remembers reading somewhere that there are several *FX calls that operate directly on the BELL character (CTRL-G), but cannot find any reference to them in the User Guide. Can A&B help?

A: We certainly can! In fact the four calls you are seeking are:

*FX 211
*FX 212
*FX 213
*FX 214

The first of the three, *FX211, can be used to determine which sound channel is used by CTRL-G. The normal default value is channel 3, however an interesting white noise bell can be implemented with #FX211,0.

*FX212 accesses the bell SOUND information, which basically allows you to determine either the amplitude of the ENVELOPE number to be used by the BELL, the actual value to be written should be the amplitude or ENVELOPE value minus 1, multiplied by eight.

*FX213 determines the frequency or pitch of the BELL character, *FX213,200 gives a high pitch Bell while *FX213,10 a low pitch sound.

Finally *FX 214 can be used to adjust the BELL duration. *FX214,1 will be the quickest of beeps. While *FX254 produces a CTRL-G lasting a good twelve seconds. If you're really game for a laugh, try *FX214,255!


Q. C.J. Hill of Tyne & Wear writes, "I have successfully used the screen dump program from the Jan/Feb issue of A&B. However being a novice in this area I fail to understand why programs written in MODE 7 cannot be dumped. Further is it possible to obtain a program to perform this function?"

A: An interesting question! The basic reason a teletext screen cannot be dumped to a printer directly from screen in the normal way is because it is organised in a totally different manner. Many of the more popular printers these days, such as Star and Epson, have the capability of performing bit image graphics. Using some suitable software each pixel of screen memory is read off the screen and turned into a binary number which determines which of the eight pins on the head of the dot matrix printer head are fired.

This conversion is really quite simple because the graphics mode being dumped is also a bit-mapped display. The conversion process is required because the printer head works across the screen in rows of eight bytes therefore a column of eight bits from eight bytes stacked on top of each other are printed one at a time.

The teletext screen is organised in a completely differnt manner, and it is in fact controlled by a special chip - IC5 on the PCB an SAAS5050 Teletext Character generator. Each character on the Teletext screen is formed using a 2*3 pixel block, and it is not possible to read these off the screen and dump in the normal way.

However Teletext dumps are certainly possible providing the printer being used as a definable character set or graphics characters. The software is more complex also because control characters must be interpreted correctly to produce double height characters and so forth.


Q: Andrew Robert of Romford has recently acquired a Disc Drive and Interface and has some problems, I'll let him explain... "I have recently purchased a single disc drive and Acorn DFS interface. While I have been able to load and save my programs correctly with no problems I am unable to construct a !BOOT correctly so that it will automatically CHAIN a particular BASIC program when I perform a SHIFT-BREAK. Can you please advise me?"

A: There could be several reasons why your !BOOT file is not working correctly, your letter is a little vague as to how far you actually 'get' so I'll go through the whole process which is not too difficult.

Firstly, we shall assume your BASIC program is called GUM and that it is saved on disc. If it is not already there, place the disc containing GUM in the disc drive and type:

*BUILD !BOOT

The drive should now whirl and a four figure line number shoud appear looking like this:

0001

Now type: CHAIN "GUM" (RETURN)

line number 0002 should now appear. We have actually finished our !BOOT file so now press ESCAPE. Once again the disc should whirl and then the prompt reappear. What we must do now is to tell the disc that it contains a !BOOT file, to do this type:

*OPT 4,3

Once again the disc should whirl and the !BOOT file is complete. Holding down SHIFT and tapping BREAK should now LOAD and RUN the GUM !BOOT (ouch).

Bruce Smith