home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
pcmag
/
vol6n21.arc
/
MAINPROG.BAS
< prev
next >
Wrap
BASIC Source File
|
1987-10-26
|
1KB
|
47 lines
' Mainprog.bas is the "main program" giving you an example of how to
' call subprograms.
' The program calls two subprograms to find out if a color or monochrome
' monitor is active (Subprog1) and to find out if a Hercules adapter
' is in the system (Subprog2)
CALL Find.monitor(Monitor.segment%, Egamode%, Egacolumns%, Egarows%, Egastatus%, Egamem%)
CALL Hercules.there(Hercules.status%)
PRINT "The currently active monitor is on a ";
IF Monitor.segment% = &HB000 THEN
PRINT "monochrome adapter."
ELSE
PRINT "color graphics adapter."
END IF
IF Egastatus% = -1 THEN
PRINT "There is no EGA or VGA card present."
ELSE
IF Egastatus% > 9 THEN
A$ = "VGA "
Egastatus% = Egastatus% - 10' don't need the added 10 anymore
ELSE
A$ = "EGA "
END IF
PRINT A$; "is present in ";
IF Egastatus% = 1 THEN PRINT "monochrome mode." ELSE PRINT "color mode."
PRINT "The current video mode is"; Egamode%
PRINT "The monitor is displaying"; Egacolumns%; "columns ";
PRINT "and"; Egarows%; "Rows."
PRINT A$; "card has"; Egamem%; "kbytes of memory."
END IF
PRINT
IF Hercules.status% = 0 THEN
PRINT "There is no Hercules adapter in this system."
ELSE
PRINT "There is a Hercules or compatible adapter in this system."
END IF