
Getting screen 12 in ASIC
Quote:
> You can do it with OUT, but you'll need to issue many OUTs before you can
> access it (200+). Can you reach the video interrupt? (INT 0x10)
To reach the video interrupt, you need QuickBASIC's QB.QLB, else you need an
*assembly* program. Check out
http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/DOS-Interrupts.html for
this issue.
Note: Use http://babelfish.altavista.com/translate.dyn for translation of
this article from German into English - I'm still working on it... ;-)
For *old* BASICs such as GWBASIC.EXE, I used a small but very clever trick
to get SCREEN 12 video mode. Check out my article at
http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/VESA-Schnittstelle....,
section "Fr GW-BASIC-Programmierer: Nutzung von VGA" below.
There, I bypassed writing an assembly routine by using the ANSI.SYS device
driver shipped in every MS-DOS and Windows, so you just have to add a line
DEVICEHIGH=C:\DOS\ANSI.SYS (or DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS)
to your C:\CONFIG.SYS file and reboot the machine.
In your program, simply send a ^[[18h character sequence:
OPEN "con" FOR OUTPUT AS 1
PRINT#1, CHR$(27); "[18h";
CLOSE 1
so you get the video mode. To set pixels, you need to operate with
POKE/PEEK() and OUT (modifying VGA planar mask registers). A small trick
would be to set SCREEN 9 first. GWBASIC really allows you using the normal
graphic command stuff there, but only into the first 350 pixel rows, i.e. to
access to all 480 rows, you have to use POKE anyway.
Check out both the example programs VGADEMO.BAS as well as VESADEMO.BAS (SUB
procedure VesaPsetPlanar). VGADEMO.BAS demonstrates you this technique with
SCREEN 13 mode while VESADEMO.BAS shows you how to access to these OUT
registers.
Note: You can get a documentation of all these ANSI.SYS sequences by
invoking "help ansi.sys" on the DOS prompt (MS-DOS 6.22). In Windows, check
out \TOOLS\OLDMSDOS on your installation CD-ROM to get MS-DOS's HELP.COM
utility.
Andreas