Do you think that your computer has graphics hardware?

Answer:

Yes. All modern desktop computers have graphics hardware.

SCREEN Statement

Read this entire page before entering and running the example program.

A program must have a SCREEN statement before it does any graphics. A computer that is more than fifteen years old might need to use one of the older SCREEN modes. We will always use SCREEN 12. Here is a graphics program which puts one spot on the monitor screen. To be safe, close down any other programs you have running on your computer before you run this one.

'Put a spot on the screen at column 30 row 50
SCREEN 12
PSET (30, 50)
END

When you run the program, the QBasic system starts up the graphics hardware and a graphics screen will appear on your monitor. This screen is a temporary replacement for the screen that you usually see on your monitor. You should see a small spot close to the upper left of the monitor screen.

The monitor screen will be filled with the graphics screen. (The above image is smaller than the graphics screen you will see.) At the bottom of the screen you should see the prompt:

Hit any key to continue

Hit some key (like "enter") and you will go back to the QBasic screen which shows your program. However, the QBasic screen will now completely fill the monitor screen.

To return to the normal Screen:

To get back to the usual situation where QBasic fills just one window on the screen, do this:

  1. Press and hold down the keys <alt><enter> (press the "Alt" key, keep holding it down, and press the "enter" key).
  2. You should be back to the normal screen. If not, click the mouse in the screen and repeat <alt><enter>
  3. .

This is an awkward procedure, so practice it a few times before you enter long programs.

QUESTION 2:

What is wrong with the following program?

'Put a spot on the screen at column 30 row 50
PSET (30, 50)
SCREEN 12
END