Getting screen 12 in ASIC 
Author Message
 Getting screen 12 in ASIC

For some reason, the ASIC compiler does not support screen 12.  Is there a
way around this, perhaps by using the 'poke' or 'out' commands?

Also, is this the most appropriate newsgroup for ASIC discussion?

Thanks,
Alex.

______________________
Alex Waters



Mon, 02 Jun 2003 09:22:19 GMT  
 Getting screen 12 in ASIC
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)


Quote:
> For some reason, the ASIC compiler does not support screen 12.  Is there a
> way around this, perhaps by using the 'poke' or 'out' commands?

> Also, is this the most appropriate newsgroup for ASIC discussion?

> Thanks,
> Alex.

> ______________________
> Alex Waters




Mon, 02 Jun 2003 17:16:31 GMT  
 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)

Yes, ASIC has INT and SETREGS commands.  Unfortunately I don't know enough
about CPU registers to use them.  Any more clues?  All I need to do is
switch the screen mode to 640x480x16.  I'm okay from there on.

Thanks,
Alex.

______________________
Alex Waters



Mon, 02 Jun 2003 20:09:41 GMT  
 Getting screen 12 in ASIC

Quote:
> Yes, ASIC has INT and SETREGS commands.  Unfortunately I don't know enough
> about CPU registers to use them.  Any more clues?  All I need to do is
> switch the screen mode to 640x480x16.  I'm okay from there on.

You'll also have to do all your own low-level graphics commands since any
commands built-in won't recognize SCREEN 12

Tom Lake



Tue, 03 Jun 2003 00:06:54 GMT  
 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



Wed, 04 Jun 2003 07:10:30 GMT  
 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)

> Yes, ASIC has INT and SETREGS commands.  Unfortunately I don't know enough
> about CPU registers to use them.  Any more clues?  All I need to do is
> switch the screen mode to 640x480x16.  I'm okay from there on.

I have arrived at a solution after spending some time on the internet.  In
case anyone is interested, the following 2 lines will set the video mode
to screen 12 (in ASIC):

AX=18
INT86(16,AX,NA,NA,NA,NA,NA,NA,NA,NA)

______________________
Alex Waters



Wed, 04 Jun 2003 10:05:30 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. faster PSET for SCREEN 12 / memory layout of SCREEN 12

2. GETTING Screen 12 and saving using BSAVE

3. save/load SCREEN 12 screens in QBasic?

4. Screen 12 backgrounds in QB 4.5

5. 80x60 in PowerBASIC Screen 12

6. Screen 12

7. Address for Screen 11,12,13?

8. QBasic Screen 12 Text

9. Bload and bsave in screen 12

10. Background Colour in QBasic screen mode 12

11. :Need Help, Fading screen 12

12. palette in screen 12

 

 
Powered by phpBB® Forum Software