The QL Qorner

See all articles from The Plotter v4 n5
Author(s): Vincent Lyon
Publication: The Plotter
Pub Details: The Plotter v4 n5 (Volume 4, Issue 5)
Date: May 1986
Pages: 4

I’m going to assume that now you find that you’re getting more and more excited about your new QL. You probably are wanting to write some special programs. Maybe even a space arcade/adventure. BUT, designing the screen is a real chore.

Suppose you wanted the screen to display everything the pilot would see: 1) a center video display which can face fore or aft on command, 2) an overhead console which reports on weapon status, 3) a small panel on the right center which shows aiming reports and target range, and 4) a below screen panel which reports on fuel, range from base, life support systems etc..

If you have anything besides a QL, then you better get out your manual on MC. With the multi-tasking QL, however, this screen display is a real snap.

On the QL one can set up all the windows in advance (we could use a DEFine PROCedure), and can print to any window and data or calculation result. Each window can be a color paper and ink, a different size with a different border, and can print in character sized designed strictly for it.

The program below shows some simple window designs with different colors and borders. I didn’t use the full range of all the available character sizes because I am sure you will want to experiment with the defined windows.

As you may note, Line #5 sets up a window which is re-designed by Line #10. That is to make sure the screen is cleared of all previously defined windows.

The rest of the program is just a demonstration of printing windows of different sizes at different screen locations.

Remember that Window #0 is always the input window. When the program ends, the cursor will be in that window.

If you don’t want to write the world’s greatest space game, you will still find mant useful applications for windows in business and game programs.

5 MODE 4:WINDOW #1,500,250,0,0,:CLS #1
10 WINDOW #1,440,150,30,0,:BORDER #1,1,7:CSIZE #1,2,0:PAPER #1,1,:CLS
20 WINDOW #0,440,30,30,155:PAPER #0,0:CSIZE #0,0,0:PAPER #0,5:INK #0,0:BORDER #0,1,7:CLS #0
30 CLS #1:CLS #0
40 INPUT #0;"enter your name ";z$
50 PRINT "HELLO ";z$
52 PAUSE 120
53 PRINT \\\\\"GOODBY ";z$
54 PAUSE 120
55 MODE 4:WINDOW #,500,250,0,0:CLS #1
60 BORDER #1,0,0:CLS
70 WINDOW #1,440,100,30,0:PAPER #1,2:BORDER #1,1,3:CSIZE #1,2,0:CLS
80 WINDOW #0,440,100,30,105:PAPER #0,0:INK#0,7:CSIZE #0,0,0
90 INPUT #0;"Enter your name ";z$
100 PRINT "HELLO ";z$
110 PAUSE 120
120 PRINT \\\\"GOODBY ";z$
130 PAUSE 120
135 MODE 4:WINDOW #1,500,250,0,0:CLS #1
140 WINDOW #1,200,100,30,0:BORDER #1,1,7:CSIZE #1,2,0
150 WINDOW #2,230,100,240,0:PAPER #2,0:BORDER #2,1,7:CLS #2
160 WINDOW #0,440,75,30,100:BORDER #0,1,7:PAPER #0,2:INK #0,6:CSIZE #0,0,0:CLS #0
170 INPUT #0\\"Enter your name ";z$
175 PRINT #0\\\\\\\\\\\\\
180 PRINT "well ";z$\\"meet my windows"\\"this is #1."
185 PRINT #2;"this is window #2"
190 PRINT #0;"and this is window #0 (the input window)"

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.