home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
scr_loc.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
808b
|
38 lines
/*--------------------------------------*/
/* */
/* SCR_LOC(X,X) */
/* */
/* Functionality: */
/* Gets the current cursor */
/* position. */
/* Arguments: */
/* 0: Horizontal coordinate */
/* 1: Vertical coordinate */
/* Returns: Nothing */
/* Functions used: */
/* INT86() */
/* Author: John Callicotte */
/* Date created/modified: 09/01/88 */
/* */
/*--------------------------------------*/
# include "dos.h"
void scr_loc(x,y)
int *x,*y;
{
int X,Y,d;
union REGS outt;
outt.x.ax=768; /* AH register is 3. */
outt.x.bx=0; /* BX register is 0 */
int86(16,&outt,&outt); /* Make the BIOS screen call. */
d=outt.x.dx; /* DX has the coordinates. */
X=d/256;
Y=d%256;
*x=X;
*y=Y;
}