www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/20/14:35:50

From: "bitc" <uh AT rt>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline ASM help.
Date: 20 Oct 1996 16:36:53 GMT
Organization: InterAccess, Chicago's best Internet Service Provider
Lines: 25
Message-ID: <01bbbea4$fd0fb680$454fb7ce@default>
References: <326425F1 DOT 10C1 AT agt DOT net>
NNTP-Posting-Host: d69.nhe.interaccess.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Marshall <MarshallK AT agt DOT net> wrote in article <326425F1 DOT 10C1 AT agt DOT net>...
> I have looked around in the docs and can't quite figure out how to call
> an interrupt in inline assembly with DJGPP. I want to set the monitor to
> video mode 13h using interrupt 10. I was wondering if someone could post
> an example or mail me one. Thanks in advance!

This is probably the cleanest way to do it:

void Set_Graphics_Mode(int mode)
{

union REGS inregs, outregs;

inregs.h.ah = 0;
inregs.h.al = (unsigned char)mode;

int86(0x10, &inregs, &outregs);

}

Where mode is 0x13 or whichever you want to use.

Jake Harvey
jwharvey AT interaccess DOT com

- Raw text -


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