EUG PD


Using Elks And BBCs

 
Published in EUG #19

Word Processing

All computers suffer lockups when the cursor stops flashing and no amount of keys have any effect except the dreaded BREAK. This can be extremely annoying if you have just typed in a letter or something. You press BREAK to get the word processor back and you lose your text. Well, it's still there. Put a disk with a lot of space on it into the drive and type:

      *SAVE XYZ 1D00 4000 (RETURN)

This will save a file called XYZ which will contain your text and a lot of garbage. Now type:

      *WORD (RETURN)
      READ XYZ (RETURN)

After a few moments the file will load. Go into your word processor and start by deleting the first few lines. When you've got rid of the rubbish at the top, go to the end of the file (CTRL and 'B' in Starword, FUNC and '3' in View) and do the same, deleting the garbage. Now save your file with a sensible filename and continue working.

Starword will restart after BREAK but *SAVE works within it.

As someone who also uses a PC, I have to say that I have never figured out what to do when a similar problem happens there.

Caps Lock

Sometimes it may be convenient for the CAPS LOCK to be switched off automatically, perhaps with a !BOOT file that loads a word processor. The easiest way to do this is with *FX 202,48.

!BOOT

Proncounced "Cling Boot", this is a special function on disks. When you press SHIFT-BREAK, the disk filing system will first check with the option is set to. This can be seen at the top of the disk catalogue. It will usually be OPTION 3 (EXEC). This tells the DFS to look for a file called !BOOT and to execute the instructions there. To set the option, type: *OPT 4,3 (RETURN).

*OPT 4,1 will load what is in the !BOOT file so if you have a piece of code like CODEx on the EUG disk, simply *RENAME it to !BOOT.

*OPT 4,2 will *RUN an assembly routine.

If you're unsure, stick with *OPT 4,3.

Function Keys

These keys can be programmed with commands you may find laborious to have to keep typing in. When I duplicate the EUG disks, I program function keys like this:

      >*KEY 1 *FORM 80|M0|M*BACKUP 1 0|MY*VERIFY 0|M
*FORM 80 is the format command from ADT. The |M is (RETURN). 0 is the drive, M is the size of disk and Y is the Y needed to start the process.

*BACKUP 1 0 is also from ADT as is *VERIFY.

By using a function key, all this is done with one key press. Incidentally, the | character means CTRL. The codes are outlined in Appendix A of the User Guide. Also, if you try to print this article, | may not be printed.

Disk Drive Numbering

ADFS recognises two drives: 0 and 1. When you use a double sided drive with ADFS, the second side will be used by formatting your disks as L. If you have two drives, single- or double-sided, one will be drive 0 and the other drive 1.

On DFS this is a little different. Assuming you have two double-sided drives, the sides are 0, 1, 2 and 3. Side 0 is on the first drive, side 1 is on the second drive, side 2 is on the other side of the first drive and side 3 is on the other side of the second drive.

Imagine your first drive is on the desk while the second is perched on top of the first.

   Side 1           Second disc drive
   Side 3
   ------
   Side 0           First disc drive
   Side 2
______________      desk

Disks And Drives

Some people are a little confused about what sort of disks and drives to use with their Elk and BBC. In a nutshell, disks should be Medium Density (MD) and double or single-sided. (Even if you have a double-sided drive, you can just choose to use one side of a single-sided disk. Likewise, if you have a single-sided drive, you can insert a double-sided disk and just use a single side of it!) Never use High Density disks like those of the PC. Although they usually seem to work, they are unreliable, prone to corrupt data and not transferable between drives!

With drives, almost any Medium Density 3.5" drive will work as a first or second disk drive. For 5.25" drives, ask if it works on a PC. If the answer is yes then don't buy it. If you have one of these then it is OK as a second drive but you already know the limitations.

If you need a new disk interface then contact either Slogger or Pres. For BBCs, Watford Electronics may also help. However, a member recently contacted Watford for a ROM board for his BBC and was told they no longer stocked them. This would be a depressing story had he not tried again. The next time, someone else sold him one! Keep trying...

Slowing Down LISTing

If you are looking through a long listing of a BASIC program, you can make it scroll through it one page at a time by pressing CTRL-N before LISTing. This is known as Paged Mode. To turn off the Paged Mode, press CTRL-O. Another way, sometimes more convenient, is to hold down SHIFT and CTRL together. Lifting one key will allow the scrolling to continue. Pressing both down again immediately stops it.

BASIC Into View/Starword

When writing your next article for EUG, to include a BASIC listing in a word processor file, go into BASIC, LOAD the BASIC file, type:

      *SPOOL article (RETURN)
      LIST (RETURN)
      *SPOOL (RETURN)

Now go back to the word processor and type:

      READ article (RETURN)

Testing Your Printer

Some programs give the option to print out to a printer. If the printer is not switched on or not connected then the program will hang up and nothing, it seems, will make it go. This short routine will test if the printer is ready to accept data and could easily be incorporated so that if not, the program can carry on with something else.

      10 IF FNtestprinter THEN PRINT"Printer operational" ELSE PRINT"Pri
   nter switched off"
      20 DEF FNtestprinter:VDU2,1,0,1,0,3:=(ADVAL(-4)=63)

Printer DIP Switches

Some word processors (Starword for example) need the line feed dip switch on the printer switched off otherwise on printout they give double line spacing. Unfortunately when you try to print from any other source you need the automatic line feed or else the printer paper doesn't roll up and everything is printed on the one line. Unfortunately Starword cannot be reprogrammed as it's in ROM so the solution is to add a line feed to everything else with *FX 6,0.

In a BASIC program, this might need to be done like:

      10 OSCLI "FX 6,0"

Getting the Pound (£) Sign

The code for the pound on most printers is &35. This happens to be the code on the Elk and BBC for the hash (#). So if you want to print a £ sign onto paper, use the hash i.e.

   "Dear Gus, I have just won the Lottery and am sending you #1,000,000"

Star And OSCLI

Notice the use of OSCLI instead of the * in a BASIC program. If the FX code is the only thing on a line then you can write 10 *FX x,y but if you have anything else on the line, the *FX code will not be recognised. So get into the habit of using OSCLI instead of *.

Faults On The Elk And Beeb

Faults are comparatively rare, especially considering that most machines are over ten years old. As someone who has done repair work on PCs, I can tell you this is more than quite good. Most faults are caused by faulty contacts, where pins on chips or sockets become corroded with time. Consequential damage can also occur.

Clean all contacts including the edge connectors with a low residue contact cleaner. Make sure that anything which is plugged into any socket is firmly plugged in and not moving at all. Fix and anchor screws and bolts in place. Check for poor solder joints, dirt and dust and signs of damage especially burning on components. Finally make sure that any ROMs you have have a covering over their window. It is surprising how quickly any light can destroy the data.

FUNC Keys

With some software, when you go back to BASIC, the FUNC keys like LIST won't work without typing BREAK. This can sometimes be a little inconvenient. Try typing *FX 226,1 (RETURN).

Have you any tips which you use? Perhaps you have developed these yourself over time or maybe someone passed them on to you. Send them in.

Gus Donnachaidh, EUG #19

Gus Donnachaidh