[PROGRAM PITSTOP]

Hey dudes! Get funky and get tapping. It's the latest craze to sweep the nation and Craig's gonna teach you how to do it. Hurrah!

-----------------------------------------------------------

Hello and welcome once more to the black and white bit, otherwise known as the Pitstop. Or should I say - YO! and get down to the funkiest selection of red-hot programs this side of Groovesville!? Okay, perhaps not. This month we have, as usual, the best in home-grown routines for the Spec and SAM (well, actually there aren't any SAM ones this month), and whether you're a beginner or an expert, there's bound to be something to interest you, so get reading! Sales pitch ends.

-----------------------------------------------------------

ON ERROR!

by Miles Kinloch

Miles Kinloch, that rings a bell... Ah! Here we are - Issue 46 - Fractal Triangles by Miles Kinloch. I though as much. So, no stranger to these fair pages, Miles returns in style with, as you may have guessed from the title, and error-trapping routine. Nice and short, just as it should be, and the whole thing oozes with user-definability. Not only can you tell the routine which program line to jump to in the event of an error, but you can also read the number of the error, and relocate the actual routine absolutely anywhere in the RAM. Good eh? To get the routine up and running, type in and run the Decimal Loader. This will save out the machine code to tape. Then reset your Speccy and type in the demo program, saving it with SAVE "prog" LINE 9990 (so it will load the machine code on running).

The Instructiony bit!

First of all, you must tell the routine which line to jump to when an error is detected. To do this, divide the line number by 256. Then POKE the answer into the 81st address, and the remainder into the 80th address. In the example program (line 150), the code begins at 40000, and so the required line number (500) is POKEd into 40079 and 40080 (the 80th and 81st addresses). Next, turn the error-trapping on by using RANDOMIZE USR followed by your start address (in the demo it's 40000). This MUST be done from a BASIC program, though, as simply entering it as a command has no effect. Also, don't try to turn the trapping on when it's already on, as this could have nasty results. When the routine detects an error, the number of the error can be found by PEEKing at the 104th address (40103 in the demo). Finally, trapping can be turned off by RANDOMIZE USR, then the 90th address.

On compatibility - the routine works best on 48Ks, as it recognises all the 48K errors, but might not be able to cope with those resulting from special 128K commands (which, if I'm correct, comprise just PLAY and SPECTRUM). And finally, SAM owners needn't feel left out, as the Coupe already has an error trapping routine built into the ROM. Read the manual!

ONERROR! Decimal Loader

ONERROR! Demo

-----------------------------------------------------------

BEGINNERS' CORNER

by Andrew Ennis

This month we show you how to create for yourself a brand new version of Tasword 2. But don't get all over-excited - you don't have to write a whole new word processor! This little program that Andrew has sent in allows you to specify multiple copies of a document when printing - as he says, something that Tasman could easily have included in the first place, and, in fact, did on the SAM version (I don't know about the 128K versions though - I'm not into that sort of thing). To get this modification up and running, first load in Tasword 2 and BREAK out of the program. Then type in the following lines and RUN. You can then use the Save Tasword option to save the new version.

TASWORD 2 Modifications

-----------------------------------------------------------

GRABBER

by Steve Anderson

This routine allows you to load in an ordinary SCREEN$, then draw a box around the portion of the screen you want to grab and, um, grab it to memory. The data is stored as consecutive bytes (eg, if your sprite box is ten squares long, the next line of the sprite will be stored at the start+11th byte). Type in the name of the screen you want to grab from and the address where you'd like the sprite data to be stored. Then, once the screen is loaded, use keys Q, A, O and P to travel round the screen. Press SPACE to enter grabbing mode, and define your sprite box. Finally press SPACE and Grabber will store the sprite data at the address you typed in earlier.

Sprite Grabber

-----------------------------------------------------------

BITS 'N' BOBS

As promised (ages ago) the Draw It covertape coreection, to let you use that snazzy old program on a +3. Firstly, enter +3 BASIC, and type LOAD "t:" to select the tape device, and then MERGE "DRAWIT" to load the first BASIC chunk. Now change line 1 to:

1 CLEAR 24660: LOAD "DRAWN" SCREEN$: INK 8: PAPER 8: PRINT AT 19,0;"+3 DISK": LOAD "DRAWCODE" CODE

Type SAVE "a:" to select the internal drive device, and save the BASIC to disk using SAVE "DISK" LINE 1. Now type NEW, enter +3 BASIC again and RUN the modification program. And thanks to Marc Eastwood and K Bostock, you now have a working version of Draw It! And in response to your questions, Marc: No, I don't have a spare copy of Dizzy's Excellent Adventures to give away, and no, I'm afraid I can't stand Public Enemy.

Draw It! +3 modification

Back to more important matters - the first SAM program to be printed in Pitstop for ages (issue 80's SAM Embroidery) didn't work! Sorry about that - what you need to do is alter lines 80 and 90 so that they read:
80 PLOT 0,173: DRAW N,-173
90 PLOT 255,173: DRAW -N,-173

and it should work perfectly.

And finally, a word of apology to Guy Palmer, whose Screen Compressor earned him £50 the other month. The apology is for the pseudonym that went with it, and that definitely wasn't my fault!

-----------------------------------------------------------

BLEAH

...as Marvin the Paranoid Android once said. Well, 'tis the end once more. Before I go and collect my A-Level results, cyanide tablets at the ready, I'd just like to say a few words.

Send in your lovely programs to me, on TAPE (not +3 disks, although SAM disks are okay). My name's CB, and the address is Perspicacious Pitstop, YS, 30 Monmouth St, Bath, Avon, BA1 2BW. Hello, good evening, welcome, and goodbye.

-----------------------------------------------------------

Chunky thanks to Ian Spencer, whose SAM to PC convertor made Andy's job loads easier!

-----------------------------------------------------------

[BACK TO CONTENTS PAGE]
©1992 The Y-Nots, HTML version ©1995 Simon Cooke