#D4#D5#D6#D7[=0hf If you can read this, then you are not TYPEing this file to the screen on a BBC Master 512. If you haven't already done this, then try it. Use the /P command-line switch. At the DOS command line enter: TYPE DEMOCTLS.TXT /P After you have seen what happens, then come back and look at the file with your word-processor. You will see that it is a pure text file, apart from included "Escape sequences". Because of the way that COMMAND.COM pauses after every 23 new-line characters, the file is divided into 23-line blocks. This is the reason for the numerous empty lines. The real content of the file starts here: #BMControl Codes Demonstration This file should be TYPEd to thescreen using the "/P" option. It shows some of the things thatcan be done by including controlcode sequences within a text file. We begin by selecting a 40-columnscreen mode, drawing a prettyborder, shrinking it by one line (to allow space for the "Strikea key" message) and putting sometext in it like this.  #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 b1Now we will try some colour variations. b2This is another colour. Four at once are possible in this mode. b3We could try rbold text in b:various b9colours, b3but it is rather hard to read. If we set the default to black then we cannot see the text. So let's hide the usual "Strike a key" message. b1You will need to b2press b:somethingb1 to go on with the next bit. Hb0  #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 #D4#D5#D6#D7 b1Palette changes are possible too. b2They can be used, as they can on the normal BBC Micro to make a significant amount of material appear suddenly. All of this text which has just appeared was printed on the last screen. You have just made it visible with a colour change. A slightly different effect, I think you will agree, from what happens when the text comes direct from disc to screen. b1Press a key to go on. Hb0  H #D6 Hb0  #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 #AF #AF #AF #AF #AF #AF 0 #D4#D5#D6 #D70 b9#C;b3 Any combination of the normal BBC Micro colours is possible including the b2flashingb3 ones if you have any reason to use them. Now press any key to say farewell to this display, and to turn the cursor back on. (Had you noticed it was off?) Hb0  HI I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I #D7b3e Right. That's got rid of the border. Did you like the way it went?B We have seen a number of the things that are possible in a 4-colour, 40-column mode.B It is probably time to go on to something else at this point, so:  #D00#D17 [=2h #D4#D5#D6#D7 HNow we are in an 80-column mode.B In practice, this is likely to be something you use rather more often than the 40-column one. Most programs assume that it is selected before you even get them started.B On a genuine PC this would have 8 colours available for both the foreground and the background. Also the characters could appear in both normal and intense colours, and they could be made to flash.B The 512, because of the way that it uses a squeezed down version of the host's Screen Mode 3, only allows two colours. Any attempt to change the background colour c1results in text appearing in inverse video like this.c0 Flashing text does not work and changing the foreground colour has no effect. rThe machine pretends to provide an intense colour by using this special bold font. (It is actually the normal font "thickened up" in a horizontal direction. Unfortunately, legibility is not improved.) c1The bold font can be used along with inverse video in this way.c0uB All of these effects can be produced in TYPEd files using control sequences, as you see. Various other things are possible in addition, however, so:H  E#D04Once again, palette changes are possible. The restrictions on the way the character attributes combine mean that you cannot actually hide text (apart from blanking the screen completely by making the foreground and background the same). We cannot, therefore, hide the "Strike a key" message. We can, though, arrange things so that it is somewhere else, like just under this line: H p q#Cp You may have noticed that it was in inverse as well.B Another thing that we can do is to spread out the rows vertically. We shall do this next, but the effect is not exactly smooth so Band look for p***q ... p***q to find your place.f H H  #} j#Az kp***q This is where you pressed a key p***qB When you spread out the screen like this, especially when you have changed the physical colour of the background, you can distinguish the lines and count them quite easily. If you do, you will find that there are 25. Normally you cannot use the bottom one in TYPEd files. There are ways of getting material into it, though. See the bottom line of this page. wThis is on line 25 - Switching off line wrap means we can even use the last cellH  zE#{#D00#D12#BControl Codes DemonstrationWe are almost at the end of the demonstration now. A good many of the facilities available by use of control sequences have been seen. This border, for example, is drawn automatically with a single control sequence. However, it takes up the whole screen, and if we leave it like this it is going to be spoiled by the "Strike a key" message. (That message always starts in the left-most column.) The way round this problem is to shrink the border, and put themessage underneath. Just so that you can see it happening, we shall shrink it by several lines, and slow it down a bit.fj k k k k k k j k k k k k k j k k k k k k MOne line . . .j k k k k k k j k k k k k k j k k k k k k MTwo lines . . .j k k k k k k j k k k k k k j k k k k k k MThree lines . . .j k k k k k k j k k k k k k j k k k k k k MFour lines . . .j k k k k k k j k k k k k k j k k k k k k MFive lines - I think that will do. Watch it happening if you go through again.e E#D17zThis demonstration has hopefully given you some idea of the kind of things that can be done simply by inserting control sequences into a file. Now you have seen it as a TYPEd file, have a look at it with your word- processor or text-editor. This should show you the full text, including the control sequences. You will be able to work out for yourself exactly how the sequences have been made to produce the effects. With a bit of imagination (and discretion) you will be able to enhance your own text files assuming, of course, that you are expecting them to be displayed only on a Master 512. The demonstration has not shown everything that is possible. To find out what control sequences are recognized by the Master 512's version of DOS-Plus and what they do, read the accompanying file M512CTLS.DOC. We are at the end of the file now, so everything is returned to normal, with one exception. See what happens when you press one of the red function keys. If you want to get the function keys back to their usual values then you have two options. The crude one is to re-boot. The preferable one (?) is to read the article in M512CTLS.DOC and work out for yourself how to do it!6