Classic Computer Magazine Archive COMPUTE! ISSUE 42 / NOVEMBER 1983 / PAGE 289

PEEK And PRINT

For The VIC-20

Carolyn D. Bellah

These two programs let you design and display characters four times normal size. You can store up to seven of these larger characters and recall them later for screen displays or a printout.

The two programs here allow you to design large custom characters, twice as high and twice as wide as regular characters, save them, and print them.

Program 1 sets up a programmable character grid in which you move your cursor to a desired location on the grid and hit any letter key to print at that location.

Several options are available in Program 1. There is a color (1 to 8) choice, an option to save or erase your created character, and an option to draw another. Seven characters can be stored in a protected area of RAM and can be recalled, printed, and listed in sequence by using Program 2.

Another useful feature is that the program will display the decimal PEEK values (the numeric values that are used for DATA statements) that represent your finished character. You can use Program 1 without Program 2. Program 1 isn't a long program, but it does use most of the available memory in the unexpanded VIC. For this reason, REM statements are not included. When typing in this program, do not use unnecessary spaces.

When you finish designing with Program 1, type NEW (be sure to save a copy first), and enter Program 2. This second program allows you to examine memory to see the decimal values for the data created by Program 1, and to print the values (to screen and graphics printer) along with your created character.

Program 2 also allows you to print a reversed image of your created character and the corresponding decimal PEEK values.

Here's an explanation of the programs.

Program 1

Lines

8-9 Reset top of memory pointers; copy 32 characters into protected RAM; DIMension array to recall marked grid for revision; set variables for characters and display; leave a clean slate to draw on.
10 Create string to draw grid (shifted @ key) and strings for positioning characters, inputs, etc., throughout program.
11 Array from which bit values are read.
14-16 Draw grid and set up display.
17-30 Keyboard controls.
31-33 Read grid, store values, display design.
34-36 Offer options and, with 59-63, show figure in chosen color moving around screen.
48-49 Print figure and values. The last number printed is the next address to be POKEd. If this is 7672, all available characters have been programmed.
49-54 Offer options.
64-70 Redraw marked grid for revision after display in color and motion.

Program 2

Lines

10-50 Set up display of design; print DATA values; show first and last address PEEKed.
55 Get a name for the design being displayed.
60-140 Set up display of character reversed horizontally.
170 Increment CHR$ for next design.
200-250 PEEK registers; reverse values; list them in proper order for program use.
600-620 Restructure the data for use by the screen dump routine.
60000-60070 Print a copy of the character design on a VIC 1515 or 1525 graphics printer.

(Program 2 is also handy for checking out the contents of other locations. Just change the value of PC in line 10 from 7448 to whatever address interests you.)