delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/01/00:50:16

Message-ID: <002e01bef3da$c4e896f0$02020001@osek12.fh.hosp.dk>
From: "=?iso-8859-1?Q?S=F8ren_Merser?=" <merser AT image DOT dk>
To: <djgpp AT delorie DOT com>
Subject: Re: gotoxy()
Date: Tue, 31 Aug 1999 20:00:48 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_002B_01BEF3EB.84CA30E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Take a look at the attached functions, which should do the job
regards 
Soren

-----Original Message-----
From: Matej <matej DOT baric AT guest DOT arnes DOT si>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: 31. august 1999 15:29
Subject: gotoxy()


>Hello,
>Is there some function (which is ANSI compatible) similar to
>gotoxy()??
>Thanks,
>Matej
>
>
>
>
>

------=_NextPart_000_002B_01BEF3EB.84CA30E0
Content-Type: text/plain;
	name="intreg.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="intreg.txt"

// claer screen

void cls(void) {
union REGS regs;
regs.h.ah=0x06;
regs.h.al=0;
regs.h.bh=7;
regs.h.ch=0;
regs.h.cl=0;
regs.h.dh=25;
regs.h.dl=80;
int86(0x10, &regs, &regs);
}

// gotoxy
void gtxy(int x, int y) {
union REGS regs;
regs.h.ah=0x02;
regs.h.bh=0;
regs.h.dh=y;
regs.h.dl=x;
int86(0x10, &regs, &regs);
}

//  set cursot to {x , current-y}
int wx(){
union REGS regs;
regs.h.ah=0x03;
regs.h.bh=0;
int86(0x10, &regs, &regs);
return regs.h.dl;
}

// set cursot to {current-x ,  y}
int wy(){
union REGS regs;
regs.h.ah=0x03;
regs.h.bh=0;
int86(0x10, &regs, &regs);
return regs.h.dh;
}

// get current cursor coordinates
void wxy(int& x, int& y){
union REGS regs;
regs.h.ah=0x03;
regs.h.bh=0;
int86(0x10, &regs, &regs);
x=regs.h.dl;
y=regs.h.dh;
}

------=_NextPart_000_002B_01BEF3EB.84CA30E0--

- Raw text -


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