interrupts instead of OUT

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

interrupts instead of OUT

Post by Macric » Sat Sep 24, 2005 7:56 am

i would like to know the interrupts that i need to use 64^3 colors for background in text mode (Screen 0)
how would i use those interrupts?

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sat Sep 24, 2005 9:32 am

Check the inline help for the COLOR statement.
Image

Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

Post by Macric » Sat Sep 24, 2005 10:21 am

nope, i think i need to clarify some more what i need.
i want to know the Numbers of the interrupts to be used, AX=number, DX=number, etcetera.

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sat Sep 24, 2005 10:30 am

So you basically want to find the values of the registers? If so, then you need to find a tutorial that works on functions in ASM, and write an ASM proggy that returns those values. All I know about that is that it has something to do about the stack. I know some of the people over at www.qbasicnews.com have had some experience with asm in QB.
Image

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened » Sat Sep 24, 2005 12:05 pm

To my knowledge, it would take a lot of tweaking of the VGA registers. And you can only have 256 colors at a time on a VGA.

(reading my VGA reference...)

Okay, it seems to me that you'd have to use Screen 13, and then write your own text routines.

I don't know that an interrupt would do it either...

(reading Ralf Brown's interrupt list...)

http://www.ctyme.com/intr/rb-0069.htm

I dunno, check that out.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

m2j

Post by m2j » Sun Sep 25, 2005 1:16 pm

Yeah, I dont remember ever hearing of true color text mode before...

matt

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sun Sep 25, 2005 1:37 pm

m2j wrote:Yeah, I dont remember ever hearing of true color text mode before...

matt
Yes... you are right. True color text mode is impossible. The closest thing you can get is screen 12 (640*480) with 256 colors, but only 16 atttributes.
Image

Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

Post by Macric » Mon Sep 26, 2005 2:20 am

well, i will try qbasicnews.com, maybe i will be more lucky, and Yes, in text mode screen (Screen 0) you can use as a background 262,144 colors using the OUT command.
try this code using FULL Screen (i am not saying 'maximized' window).

Code: Select all

OUT &H3C8, 0
OUT &H3C9, 22
OUT &H3C9, 33
OUT &H3C9, 44
SLEEP 1
OUT &H3C8, 0
OUT &H3C9, 0
OUT &H3C9, 32
OUT &H3C9, 0
SLEEP 1
OUT &H3C8, 0
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C9, 32
SLEEP 1
OUT &H3C8, 0
OUT &H3C9, 32
OUT &H3C9, 0
OUT &H3C9, 0
LOCATE 12
PRINT "just vary the 3 parameters &H3C9 then you will get 262,144 colors"
SLEEP 1
thank you anyway.

matt

Post by matt » Mon Sep 26, 2005 7:59 am

That is fork interesting...

I've only ever seen one VGA fork to SVGA peice of code before, and that was to force screen 13 into Xmode...

Any explanations on how this works?

m2j

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Mon Sep 26, 2005 3:00 pm

matt wrote:That is fork interesting...

I've only ever seen one VGA fork to SVGA peice of code before, and that was to force screen 13 into Xmode...

Any explanations on how this works?

m2j
Image

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened » Mon Sep 26, 2005 3:45 pm

Very interesting... especially because my VGA reference says that port 0x3C9 only uses the first 6 bits and ignores the rest. Only 6 bits would make a maximum value of 63 possible... but I can write values up to 255 when I tweak the code.

I always thought the QB text mode was an EGA mode.

Anyway, my final question is, Macric, why do you want to use an interrupt? OUT's are faster than INT's.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

Post by Macric » Mon Sep 26, 2005 4:21 pm

The Awakened wrote:why do you want to use an interrupt? OUT's are faster than INT's.
i always like to use the dark red as background, some persons told me that the OUT used that way it does not work on XP or 2OOO, another persons tell it works.
to have no doubts i would prefer to use an interrupt. i have no idea how it works, but i choose the color using this snipet http://www.qbasicnews.com/abc/showsnipp ... nippet=434
Last edited by Macric on Mon Sep 26, 2005 4:34 pm, edited 1 time in total.

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Mon Sep 26, 2005 4:25 pm

QB doesent work on windows as QB is a DOS program.

Tell the person to switch to DOS. Only solution.


Also, whats 2OOO? 2 tripple O ? Never heard of it, got any links?
I have left this dump.

Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

Post by Macric » Mon Sep 26, 2005 4:36 pm

Z!re wrote:whats 2OOO?
2OOO = windows 2OOO.

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Mon Sep 26, 2005 4:52 pm

Macric wrote:
Z!re wrote:whats 2OOO?
2OOO = windows 2OOO.
windows 2 tripple o ? Whats that?
I have left this dump.

User avatar
Michael Calkins
Veteran
Posts: 76
Joined: Tue Apr 05, 2005 8:40 pm
Location: Floresville, Texas
Contact:

Post by Michael Calkins » Mon Sep 26, 2005 5:03 pm

Windows 2000 is an operating system in the Windows NT family. It comes between NT and XP. Some feel it is one of Microsoft's better operating systems. I, of course, prefer 3.1x, 95, or 98, as these <b>will</b> work with QBASIC correctly. Technically, Windows ME is in the 9x family, I think, but some people don't like it. I've never seen it.

Ild?rest, a programmer at The QBASIC program, reported to Macric that the OUT method works correctly on Windows 2000. That would mean that it probably works on NT and XP as well.

Ever heard of Windows 2003 Server? I've never even seen it, but it exists...

Regards,
Michael
Bring on the Maulotaurs! oops...
I like to slay Disciples of D'Sparil...

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Mon Sep 26, 2005 7:42 pm

Michael Calkins wrote:Windows 2000 is an operating system in the Windows NT family. It comes between NT and XP. Some feel it is one of Microsoft's better operating systems. I, of course, prefer 3.1x, 95, or 98, as these <b>will</b> work with QBASIC correctly. Technically, Windows ME is in the 9x family, I think, but some people don't like it. I've never seen it.

Ild?rest, a programmer at The QBASIC program, reported to Macric that the OUT method works correctly on Windows 2000. That would mean that it probably works on NT and XP as well.

Ever heard of Windows 2003 Server? I've never even seen it, but it exists...

Regards,
Michael
He means 2OOO is leet and 2000 is not... but you know, better leet is S()()(). But I just realized how after the question is answered, we usually get WAY off topic in talking about windows... or like how talking about linux lead to QB vs FB.
Image

m2j

You are funny.

Post by m2j » Tue Sep 27, 2005 6:40 am

windows 2 tripple o ? Whats that?
Man, that is funny. I swear I shit my pants I laughed so much at that. I swear.

matt

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Re: You are funny.

Post by Z!re » Tue Sep 27, 2005 6:57 am

m2j wrote:
windows 2 tripple o ? Whats that?
Man, that is funny. I swear I shit my pants I laughed so much at that. I swear.

matt
Hehe, atleast someone got it :P
I have left this dump.

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Re: You are funny.

Post by {Nathan} » Tue Sep 27, 2005 2:10 pm

Z!re wrote:
m2j wrote:
windows 2 tripple o ? Whats that?
Man, that is funny. I swear I shit my pants I laughed so much at that. I swear.

matt
Hehe, atleast someone got it :P
i got it too... i just usually arnt in a laughing mood.
Image

Post Reply