www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/05/16:15:34

From: "Marp" <marp AT 0 DOT 0 DOT 0 DOT 0>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Setting mode 13h
Date: Sat, 5 Aug 2000 16:13:55 -0400
Organization: MindSpring Enterprises
Lines: 31
Message-ID: <8mhshc$fq3$1@slb7.atl.mindspring.net>
References: <jcXi5.1824$aK5 DOT 30439 AT news1 DOT online DOT no>
NNTP-Posting-Host: 04.30.99.b0
X-Server-Date: 5 Aug 2000 20:13:32 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Vermin" <ratspl AT hotmail DOT com> wrote in message
news:jcXi5.1824$aK5 DOT 30439 AT news1 DOT online DOT no...
> I've been coding gfx for a couple of years, but I've just(!) started in
> DJGPP. In Asm, all you do to set mode 13h is
>
> mov ax,13h
> int 10h
>

Be careful about using assembly code written for real mode. Although this
particular code would work under dpmi, it probably would not work in other
protected mode environments.

> But it doesn't seem to be that simple in DJGPP...
> I've tried the following piece of code with no luck:
>
> union REGS regs;
> regs.x.ax=0x13;
> int86(0x10,&regs,&regs);
>
> What's wrong??

It works for me. It would help if you tell us what actually happens when you
do this. Also, the function int86 really should not be used unless it
specifically supports that function, and int86 only supports some functions
of vector 0x21. You should use __dpmi_int instead. See the libc
documentation for details on it and read chapter 18 of the djgpp faq. The
faq is available online at http://www.delorie.com/djgpp/ and downloadable
from wherever you downloaded djgpp.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019