Fastape by Tom Baker from Your Sinclair #22 (Oct.1987) [files FAST*.*] In the first Program Pitstop we said that we'd like you to send in your routines for making fancy loaders, and sure enough you did. Over twenty programmers sent in their fancy load routines, and for the most part they were pretty good. Most relied quite heavily on people knowing a little about machine code, and had instructions that would give a PhD student a migraine. But fortunately a small proportion were interesting, menu-driven beasts which even T'zer could understand. (Huh? Wassat? T'zer) And it's these that provided the most elegant solutions to the problem. Tom Baker's Fastape routine is small, full featured and allows even the most fumble fingered among us to put fancy professional loaders on our programs. The instructions were comprehensive, and the techniques employed easy to understand. So thank you, Tom, and it's over to Fastape to provide your programs with the ride of a lifetime! METHOD The program takes the form of a little chunk of code which you load into memory at the same time as your own program, and activate it with a few simple POKEs. The Fastape routines take up a mere 715 bytes, and reside above RAMTOP at address 60000. Saving: To save a block of code using Fastape, the routine must first be given info on the address of the code, how many bytes it occupies, and which of the Fastape features you want. These features are a Multicoloured border, Blank or Masked border, Error trapping and Crash On Error,and a Countdown Timer anywhere on screen. These features are all available, depending on certain parameters which you must set with POKEs. With Fastape in memory all you have to do to save is use the command LET SAVE=USR 60003. Incidentally, there'll be no Start Tape message, so get the tape going before you press Enter. The info is given to the routines as follows: Address of code - POKE 60011,address-(256*INT (address/256)) - POKE 60012,INT (address/256) Length of code - POKE 60013,length-(256*INT (length/256)) - POKE 60014,INT (length/256) All features - POKE 60015,f Calculate the value of f from this table: F Table ------- Value F Crash on error Coloured border Countdown ------- -------------- --------------- --------- 0 NO (error message) NO (masked border) NO 1 YES NO (masked border) NO 2 NO (error message) YES NO 3 YES YES NO 4 NO (error message) NO (masked border) YES 5 YES NO (masked border) YES 6 NO (error message) YES YES 7 YES YES YES Timer co-ordinates - POKE 60007, x co-ordinate POKE 60008, y co-ordinate (where x is between 0-29 and y is between 0-23) Loading: Loading is very simple as, like the Speccy's own commands, a header is saved with each block of code which is automatically loaded by the routines. The command RANDOMIZE U6R 60000 will load in the next block of code. All the other feature POKEs still apply. An extra feature which has been added is the Security option. The contents of address 60006 must be the same as when it was originally saved. If not the routines will respond with an error message or crash (as selected). This means that if you save a code block with 60006 POKEd with 100, say, someone cannot load it in who doesn't know the number! Basic Listing This month's program is a piece of cake. Simply type in the program and save it with SAVE "FASTAPE". Don't bother with an autostart LINE number as this program merely creates and saves the FASTAPE code block for you. Just RUN it, and the program will POKE all the code into memory. Once it has saved it to tape, set the Basic bit aside, in case you lose the code block, and use the code in your own programs. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Fastape by Tom Baker from Your Sinclair #92 (Aug.1993) Bit of a blast from the past, this one (YS October 1987 actually). It's a fast loader with some groovy features, such as security, flashy borders and a loading countdown. Basically, find the start address and length of your code and POKE 60011, address-256*INT (address/256): POKE 60012, INT (address/256): POKE 60013, length-256*INT (length/256): POKE 60014, INT (length/256). POKE 60007, x-coordinate of countdown (0-29): POKE 60008, y co-ord (0-23): POKE 60015, f to set up the features and LET fast=USR 60003 to save. RAND USR 60000 to reload. Oh, and if you POKE 60006 number, that number must be present for the prog to reload. Here's how to work out the value of f. F Error bomb Border Count - ---------- ------ ----- 0 No No No 1 Yes No No 2 No Yes No 3 Yes Yes No 4 No No Yes 5 Yes No Yes 6 No Yes Yes 7 Yes Yes Yes