J.E.Lawrie HINTS-5. v.2 Printing from Basic (2) It may be useful, even essential, to get a printout of what is on screen while the program is running. It may not be presented on paper exactly as shown on the screen regarding layout, but this is not usually important. Put this line in the program listing just before you want printing to start OSCLI("CLI #+P~E"):dummy=INKEY(0) If you want printing to stop at some point before the program ends then insert - OSCLI("CLI #-P~E"):dummy=INKEY(0) You must type in these lines EXACTLY AS SHOWN ! Of course the printer has to be ready or the program will stop (though it is possible to error-trap this eventuality). The second part of each line looks nonsensical but it is vital since the CLI won't operate until it gets a keypress. This insert fools it into thinking it has (though that's not a purist's explanation !). Useful CLIs This concerns simple CLIs which are very useful and serve as an introduction to this wonderful capability of the Z88 - frankly, I would find the Z88 a little dull if it weren't for Command Line Instructions, to give their full name. Go to Pipedream and type on the top line |SV|D:RAM.0~E Save this as RAM.1/0 BUT before ENTERing, go down to the last question and say Yes. - otherwise, the file 0 will carry all of the Pipedream instructions. Go to RAM.1 and, of course, you will see 0 as the first file. Put the cursor over it and press TAB (or ENTER). You will now see a small pointer against the filename. Now type <>EX and immediately, you will go to RAM.0 - which was the object of the exercise, of course ! If you have a RAM.2 you can put 0 in there too, and if you load this CLI back into Pipedream, change the zero in the line to 1 and save it as 1 and put it in Ram.0 and RAM.2 and do the similar thing for 2 then when you want to move from one Filer directory to another you only have to EXecute the appropriate number - saves a lot of keypresses. You can also put these in any sub-directories - no changes needed. Another great use for these is this. Any time you put a file into RAM it will be in front of the numbers. Leave it there until you have saved it to EPROM (you DO save files to EPROM or some other device, DON'T YOU ?) then re-save the number ( 0, 1 or 2) to put it back in front of the others. It's a very useful reminder that you have a file (or files) which have not yet saved to EPROM ( or disc, of course). Another useful CLI You know you should NEVER leave anything in RAM.- In Pipedream, type |ER:RAM.-/*~EN~E Save it as (say) :RAM.0/CLEAR.CLI (plain text, of course). All you have to do, at any time you like, is to <>EX this CLI from RAM.0 to empty RAM.- You could of course, from any RAM, type <>ER then :RAM.-/* and ENTER, press it? and not nearly so much fun! END Back to HINTS-INDEX