www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/05/19:28:23

Message-ID: <327FF0C1.6764@gbrmpa.gov.au>
Date: Wed, 06 Nov 1996 10:07:52 +0800
From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Reply-To: leathm AT gbrmpa DOT gov DOT au
Organization: Great Barrier Reef Marine Park Authority
MIME-Version: 1.0
To: Mike Ryan <mdr6 AT dana DOT ucc DOT nau DOT edu>
CC: djgpp AT delorie DOT com
Subject: Re: ASM with djgpp
References: <327FA851 DOT 4715 AT dana DOT ucc DOT nau DOT edu>

> Can someone tell me how to translate this into DJGPP(GCC) code...

You really should read the faq... :)

> #include <dos.h>
> void _highcolor(void)
> {
>         _AH = 0x10;
>         _AL = 0x03;
>         _BL = 0x00;
>         geninterrupt(0x10);
> }

void highcolor(void)
{
	__dpmi_regs r;

	r.h.ah = 0x10;
	r.h.al = 0x03;
	r.h.bl = 0x00;
	__dpmi_int(0x10, &r);
}
 
> void _lowcolor(void)
> {
>         _AH = 0x10;
>         _AL = 0x03;
>         _BL = 0x01;
>         geninterrupt(0x10);
> }

void lowcolor(void)
{
	__dpmi_regs r;

	r.h.ah = 0x10;
	r.h.al = 0x03;
	r.h.bl = 0x01;
	__dpmi_int(0x10, &r);
}

Again, read the FAQ!

Leathal.

- Raw text -


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