%OP%JUY %OP%WRY %OP%PL60 %OP%HM0 %OP%FM0 %OP%BM0 %OP%LM5 %CO:A,74,74%%C%%H2%GRAPHICSTORE.DOC This document attempts to explain how graphics can be stored in the Z88's memory for use at any time in a Basic program. Once initiated, graphics will not be removed from the memory, not even by a Soft reset. %JL%There are several Basic programs in the Z88 Software Library which can %JL%be used to create UDGs (user defined graphics). I use Z091 by Paul Stevens, from which I learned what I know on the subject. %JL%Once created a graphic can be put on the screen, either by direct command %JR%or from within a Basic program, by entering the corresponding statement. %JR%It will not be erased from the memory except on a hard reset but it could %JL%be superceded by a graphic from another Basic program carrying the same "character code" (see later). %JL%This of course can be very inconvenient so it would be an advantage to %JR%have a store of one's graphics which could be re-instated in the memory at any time. This is what graphicstore.bas does. %JL%You can have up to 64 stored graphics, with character codes from 64 to %JR%127. Look at lines 75 to 205 of graphicstore.bas and you will see obvious similarities - %JL% VDU1,138,61,C,X,X,X,X,X,X,X,X defines the graphic. C is the character %JR%code and the eight X's decide the shape of the graphic - this is dealt with in all UDG generator programs. %JR%You can put this graphic on screen either by a direct command or from %JL%within a Basic program. You just use VDU1,50,63,C and there it is! %JL%If however you wish to combine graphics or to move them around the screen %JL%you must use arrays in the indirect form. The second part of the lines referred to show this form i.e. Array$(code no.)=CHR$(1)+CHR$(130)+CHR$(63)+CHR$(code no.) %JR%If you have a printer you can get a listing of all stored graphics, with %JL%titles and numbers and what you should use in the direct or the indirect %JR%form. You need never run the graphicstore program again, provided no %JR%other graphic(s) with the same code(s) have been introduced by other Basic programs or you feel they have been lost or corrupted. %JL%If you wish to replace any graphic in the initial graphicstore.bas then %JR%simply replace the eight numbers after VDU1,50,63,C and change B$(C) to %JL%your description of the graphic. If however you wish to add one then put %JR%it in immediately following line 205 (or wherever you have got to if this is not your first addition). Jack Lawrie (4635) 15 Sycamore Grove, Southam, Leamington Spa, CV33 0EY Tel: 0926 812884