Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QBASIC GRAPHICS

Status
Not open for further replies.
May 23, 2005
1
GB
Please I want know about QBASIC graphics. How many dots are there on a screen. I need some explanations on how to position an object on the screen.
 
How many dots on a screen depends on what screen you are using. as to how to position an object, you need to read the manual a bit.

The answer has always been 42
 
see help on SCREEN, from there - link to Screen Modes.
Besides, there is a screen in Help - Keywords by programming task, go there look for Display graphic images.
 
On most machines, the screen will default to 640*480 (W*H) resolution in DOS mode. This is not a guarantee for all machines though, so if you want your program to be able to run on a larger number of machines, you'll want to make use of the screen modes.


I hope this helps;
Rob Hercules
 
Summary of Screen Modes

The following table briefly summarizes each of the screen modes. The
color adapters referred to are
þ the IBM Color Graphics Adapter (CGA),
þ the IBM Enhanced Graphics Adapter (EGA),
þ the IBM Video Graphics Array (VGA), and
þ the IBM Multicolor Graphics Array (MCGA).
The Hercules Graphics Card, Graphics Card Plus and InColor adapters are
supported, but only with monochrome monitors.

Note: Many screen modes support more than one combination of rows and
columns on the screen. See the WIDTH statement details for
more information about changing the number of rows and columns
on the display.

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄMDPA, CGA, EGA, or VGA Adapter BoardsÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
SCREEN 0: Text mode only
þ Either 40 x 25, 40 x 43, 40 x 50, 80 x 25, 80 x 43, or 80 x 50 text format
with 8 x 8 character box size (8 x 14, 9 x 14, or 9 x 16 with EGA or VGA)
þ 16 colors assigned to 2 attributes
þ 16 colors assigned to any of 16 attributes (with CGA or EGA)
þ 64 colors assigned to any of 16 attributes (with EGA or VGA)

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ CGA, EGA, VGA, or MCGA Adapter BoardsÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
SCREEN 1: 320 x 200 graphics
þ 40 x 25 text format, 8 x 8 character box
þ 16 background colors and one of two sets of 3 foreground colors assigned
using COLOR statement with CGA
þ 16 colors assigned to 4 attributes with EGA or VGA
SCREEN 2: 640 x 200 graphics
þ 80 x 25 text format with character box size of 8 x 8
þ 16 colors assigned to 2 attributes with EGA or VGA

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄOther Adapter BoardsÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
SCREEN 3: Hercules adapter required, monochrome monitor only
þ 720 x 348 graphics
þ 80 x 25 text format, 9 x 14 character box
þ 2 screen pages (1 only if a second display adapter is installed)
þ PALETTE statement not supported
SCREEN 4:
þ Supports Olivetti (R) Personal Computers models M24, M240, M28,
M280, M380, M380/C, M380/T and AT&T (R) Personal Computers 6300
series
þ 640 x 400 graphics
þ 80 x 25 text format, 8 x 16 character box
þ 1 of 16 colors assigned as the foreground color (selected by the
COLOR statement); background is fixed at black.

Warning: Olivetti personal computers running 3XBOX under OS/2 should avoid
this screen mode.

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄEGA and VGA AdaptersÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
SCREEN 7: 320 x 200 graphics
þ 40 x 25 text format, character box size 8 x 8
þ 32K page size, page ranges are 0-1 (64K), 0-3 (128K), or 0-7 (256K)
þ Assignment of 16 colors to any of 16 attributes
SCREEN 8: 640 x 200 graphics
þ 80 x 25 text format, 8 x 8 character box
þ 64K page size, page ranges are 0 (64K), 0-1 (128K), or 0-3 (246K)
þ Assignment of 16 colors to any of 16 attributes
SCREEN 9: 640 x 350 graphics
þ 80 x 25 or 80 x 43 text format, 8 x 14 or 8 x 8 character box size
þ 64K page size, page range is 0 (64K);
128K page size, page range is 0 (128K) or 0-1 (256K)
þ 16 colors assigned to 4 attributes (64K adapter memory), or
64 colors assigned to 16 attributes (more than 64K adapter memory)

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄEGA and VGA Adapters, Monochrome Monitor OnlyÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
SCREEN 10: 640 x 350 graphics, monochrome monitor only
þ 80 x 25 or 80 x 43 text format, 8 x 14 or 8 x 8 character box size
þ 128K page size, page range is 0 (128K) or 0-1 (256K)
þ Up to 9 pseudocolors assigned to 4 attributes

ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄVGA and MCGA AdaptersÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Screen 11
þ 640 x 480 graphics
þ 80 x 30 or 80 x 60 text format, character box size of 8 x 16 or 8 x 8
þ Assignment of up to 256K colors to 2 attributes
Screen 12
þ 640 x 480 graphics
þ 80 x 30 or 80 x 60 text format, character box size of 8 x 16 or 8 x 8
þ Assignment of up to 256K colors to 16 attributes
þ VGA required
Screen 13
þ 320 x 200 graphics
þ 40 x 25 text format, character box size of 8 x 8
þ Assignment of up to 256K colors to up to 256 attributes
 
Also read about VESA and The command 'call interruptx'. You can read gfx card's bios and set the display however you want.
 
Also, to position stuff... consider it the 1st quadrant of a cartesian graph flipped up side down... in other words, pixel 1,1 is at the top left, and 640,480 is the bottom right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top