Advertisement

Mode 13h....

Started by November 07, 2000 08:51 PM
18 comments, last by Drakkhen 24 years, 1 month ago
To learn DirectX, you''ll need to have a version of it installed on your system (the current is 8, which you get in the SDK download from Microsoft''s website (http://www.microsoft.com/directx/)).

If you want to stick with DOS Mode 13h graphics, check out "Teach Yourself Game Programming in 21 Days" (which is currently unavailable at Amazon.com). It''s a great reference for all this sort of programming.

If you want to migrate to DirectX programming, check out the myriad game programming tutorials on the Internet, and on this website in particular.


MatrixCubed
http://www.MatrixCubed.org


Try this instead:

       DOSSEG       .MODEL TINY       .STACK 100h       .CODEstart: mov ah,0  ; I wanna change the resolution       mov al,4  ; we want to go to 320x200 (the magic mode 13h)        int 10h   ; call interrupt 10h; insert code here       mov al,2  ; we want to go back to 80x25 text       int 10h       mov ah,4Ch       int 21h       END start  



/mikael_j


Edited by - mikael_j on November 13, 2000 12:47:22 PM
Advertisement
Now I don''t have alot of experience with ASM, but isn''t 100h where the beginning of *.com files are loaded?

"I can''t work like this! Where are my fuzzy dice?"
"I can't work like this! Where are my fuzzy dice?"
I just started coding x86 asm quite recently, but I think .STACK 100h means that you set the size of the stack to 256 bytes
(could''ve mis-read it though)

/mikael_j
Yeah, sorry ORG 100h is the start location for *.com files.

"I can''t work like this! Where are my fuzzy dice?"
"I can't work like this! Where are my fuzzy dice?"
The instructions for popping and pushing all general registers are POPA and PUSHA, but they shouldn''t be necessary or actually affect anything in this situation. I''ve used this code in many DOS programs running under Windows or straight DOS compiled in Borland C++ 4.52 without any problems.

mikael_j - mov al, 04 requests CGA 320x200, 4 color. You want mov al, 13 for MCGA/VGA 320x200, 256 color. Also, mov al, 02 requests 80x25 mono, but most BIOSes as of the 386 use mode 3 (mov al, 03) as the default, for 80x25 color.
Advertisement
Whoops...
perhaps I should have looked it up first
(the book I'm using does say that 02 is for 80x25 color,
but when I tested it, it was mono...)

/mikael_j

Edited by - mikael_j on November 15, 2000 5:54:21 AM
I havent touched qbasic is 4 years. But when I did i set the screen mode by calling screen. Why did you use assmebly?

I rmemeber I would always use screen 12.

DJGPP is the best for dos mainly cause its fast and free
gcc forever!!!!!!
i was in the same boat, holding the dos picket signs in front of the windows strike, using libraries is cheating, etc.

man, did it hurt to use ogl for the first time, win32 for the matter, but eventually all the pain goes away, you begin feeling good about yourself again, and you realize 1) everybody''s doing it anyway, and 2) it would take me months, if not longer, to reach this level of productivity.

i''m not encouraging the use of using libraries in place of code a real programmer can write (i.e. fricking VB and VC++, WHICH ARE FOR PEOPLE WHO CAN''T WRITE THEIR OWN CODE ( lol )), but i''m talking about things like accessing the 400 different types of monitors, video cards, keyboards, joysticks.. etc

10 years ago it was possible for a single program to be compatible w/ almost any type of hardware.

yeah, and in Newton''s time, it was possible for a man to know everything there was in the world, too

i dont'' think it''s possible to do astounding things involving hardware w/o librarys it access them. sure, you don''t get to draw your own polys, and that really pisses me off, but still, they''re probably being faster than i could make them go anyway.

just my 2 cents, from an individual sympathetic to the situation

//////////////////////////////

I have no name that you may call me. I am Succinct, so call me as such.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-- Succinct(Don't listen to me)
aamf, here''s some quotes from Michael Abrash (quake guy):

"
Stand on the shoulders of giants. There are few brand-new ideas in the world; read what others have done rather than trying to invent everything yourself. Most of programming success lies in engineering and integrating and finishing and being flexible, rather than in raw invention. Sure, it’s fun to reinvent things, but there’s a huge amount you have to know now, so it’s hard to do it all on your own. Besides, there’s plenty of cool stuff to figure out after you learn what’s already been solved.

Learn as much math as you can stand. Then learn some more. The industry is moving from broad, seat-of-the-pants programming to software more dominated by content and deep knowledge of areas like physics. Programming itself is easy; it’s expertise in knowledge-intensive areas that will increasingly set programmers apart in the future.

Be patient. It takes one year to become competent at something new, three years to become an expert.

Stretch until it hurts. Be flexible. Don’t get attached to your designs or code. Be willing to listen to new viewpoints, admit it when you’re wrong, and change your mind as appropriate.

Embrace change… or watch it run you over and leave you behind. Accept that the goals, techniques, and rules will constantly change.
"

dunno, inspiration, maybe?

just got done reading it and i figured it was appropriate


//////////////////////////////

I have no name that you may call me. I am Succinct, so call me as such.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-- Succinct(Don't listen to me)

This topic is closed to new replies.

Advertisement