Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

146 80 NEXT N 90 END You will see that this prints the ball at the point (N,500) and then ‘unprints’ it only to print it again one step further on, and so on. To speed the ball up, alter line 50: 50 FOR N = 1 TO 1000 STEP 10 How to create your own ‘graphics’ characters Each character which you type in at the keyboard has an associated ASCII code. When the computer is told to print this character it looks up the code and prints the appropriate character as an eight by eight matrix of dots. The letter ‘A’, for example, has the code value 65 and ‘a’ has the value 97. (See Appendix A for the other codes.) However, certain code values have been left to be defined by the user.

They include values 224 to 255. (See chapter 34 for more details.) They can be defined by use of the VDU 23 command. How to make a character (eg a man) Create the character by planning it on an eight by eight square grid. Note the numbers along the top of the grid which start at the right and double at each column to the left. To store the character shown above as code number 240, type in VDU 23,240,28,28,8,127,8,20,34,65 The numbers which follow VDU 23,240 tell the computer the pattern of dots in each horizontal row. These values are the ‘byte’ patterns corresponding to the eight cells of each row. They can be calculated in a number of ways and entered as a decimal or hexadecimal number.

The simplest way for the novice is to add up the values shown in the diagram above. Thus row a consists of 16+8+4=28, row b is also 28, the third row is 8, the fourth row is 64+32+16+8+4+2+1=127, and so on. So to create the little man, type the following program: 5 MODE 5