LINE GRAPHICS IN Z88 BASIC -------------------------- The Cambridge Z88 has the capability to geneerate "IBM style" line graphics. This file gives a brief description of how to do it,and ends with a program (CLI file) which will generate each of the internal line graphics symbols. In addition, up to 64 user defined characters can also be defined and used -- but more on that in a later file. The Z88 can use VDU commands. For example: VDU 1,ASC("B") will toggle bold on or off; this is functionally equivalent to PRINT CHR$(1)+"B", but I believe the VDU technique is faster, significant if you are making a complex shape from a large number of symbols. To make use of the elementary shapes to make a composite shape, you will need to control the motion of the cursor as you go. You can toggle the cursor on and off with VDU 1,ASC"C" -- or VDU 1,67. Single-step cursor motion can be achieved with the following: Left: VDU 8 Right: VDU 9 Down: VDU 10 Up: VDU 11 More generally, the following command will move the cursor to column x and row y: VDU 1,ASC"3",ASC"@",32+x,32+y The line graphics symbols are generated by VDU commands of the following form: VDU 1,ASC"2",ASC"*",ASC"char" where char is a letter in the range A to O. This is the briefest description of this Z88 feature; a much fuller description is given in the "Z88 Developers' Notes". The following CLI-style program will print each of the line characters, and move the cursor one column right to print the next one. It and the above information should be all you need to start using this Z88 graphics capability. #B .J NEW 10 *NAME GRPHCOD 20 Z=65 30 REPEAT 35 REM make a line graphics symbol [Z=ASC(A) thru ASC(O)] 40 VDU 1,ASC"2",ASC"*",Z 45 REM cursor right (8=left; 9=rt; 10=dn; 11=up) 50 VDU 9 60 Z=Z+1 70 UNTIL Z=80 75 REM the following loop will keep running until ESC is pressed 80 REPEAT 90 UNTIL FALSE --------------- Phil Wheeler Torrance, CA 21 Dec 1988