Advertisement

Accessing mode 13h?

Started by June 07, 2000 05:43 PM
15 comments, last by OreoBoy03 24 years, 6 months ago
Hi! Would someone please post the code I need to access video mode 13h from within MSVC''s inline assembler. Thanks!
sorry to burst your bubble dude but''cha can''t unless you use a 16-bit compiler to compile for dos(maybe win 3.x?)
it doesn''t come with the standard edition though (I don''t think it does anyways)
you''ll have to find some other way to do it if you are using win32 compilers. If you can do it w/o directX lemme know about it cuz I''d love to hear how

-arsenius
after 3 days without programming, life becomes meaningless
-unknown
Advertisement
Small correction: It doesn't have to be 16-bit. It just has to be a DOS program as opposed to Win32 programs. DJGPP compiles 32-bit programs but allows this cuz it compiles DOS programs. If you want to use assembly to change the video mode you can get DJGPP for free here . If you do get a program which can do this, the assembly instructions to get to mode 13h are:

mov ax, 13h
int 10h


The register ax is where the video card looks to see what instruction to do after you get it's attention with int 10h. 13h means go into video mode 13h. Text mode is 3h.

Edited by - Sheltem on June 8, 2000 5:43:07 AM
Borland (builder and such) also compiles Dos 32bit,

But it ain''t Free



a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Ever notice how Evil spelled backward is Live?

-=CF=-
a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Why is it called a hot water heater? Isn't it cold when it goes in the tank?

[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
Actually you can, but there isn''t any documentation for it.
The problem is that you need to kill the GDI layer from windows to access it.. I bought a book that mentioned it but did not show how because Windows was not really made to have it''s GDI layer removed. If anyone ever went to www.hornet.org and ran some Win32 demos that do not use DirectX.. well that''s pushing the video mode through windows, but there is no code there to show how to do it which makes me think...

The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.

?Have a nice day!?

I believe that Borland released one of it''s DOS compilter''s for free download. All you have to do is register. (for free) Go to their website and check it out. (I still like DJGPP better)
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Advertisement
oreoboy -
create a console app. then,
_asm
{
mov ax, 13h
int 10h
}

the program has to be a console app, obviously.


-goltrpoat



--
Float like a butterfly, bite like a crocodile.



Edited by - goltrpoat on June 9, 2000 10:35:26 AM
--Float like a butterfly, bite like a crocodile.
Goat~
It doesn''t work. I tried that LONG before I posted. It just gives a nasty blue screen with a fatal exception error.
Yeah, I'm pretty sure console apps are really just Win32 programs disguised with a DOS interface. They rely on kernel32.dll to begin execution just like regular Win32 programs (in debug mode it says it loads kernel32.dll so I'm just assuming). Also, Quickview reports it as a 32-bit Windows executable. If you try to run a console app in DOS mode, you will get the program stub "this program must be run in Windows" or whatever.

Edited by - Sheltem on June 10, 2000 2:58:06 AM
no, it works fine. maybe not in asm though.. you might need to use int86() or whatever, since we''re in 32 bit mode and interrupts need to be handled by the OS.. i remember i got it to work somehow.


--
Float like a butterfly, bite like a crocodile.

--Float like a butterfly, bite like a crocodile.

This topic is closed to new replies.

Advertisement