usr.bin/tn3270/distribution/sys_dos/termout.c
/*
 * Read the state of the video system.  Put the cursor somewhere
 * reasonable.
 */
Read the state of the video system.  Put the cursor somewhere
reasonable.
Read the state of the video system . Put the cursor somewhere reasonable .
static void
scrini()
{
    union REGS inregs, outregs;
    inregs.h.ah = CurrentVideoState;
    int86(BIOS_VIDEO, &inregs, &outregs);
    crt_mode = outregs.h.al;
    crt_cols = outregs.h.ah;
    crt_lins = 25;
    curpage = outregs.h.bh;
    inregs.h.ah = ReadCursorPosition;
    inregs.h.bh = curpage;
    int86(BIOS_VIDEO, &inregs, &outregs);
    if (outregs.h.dh > crt_lins) {
	outregs.h.dh = crt_lins;
    }
    if (outregs.h.dl > crt_cols) {
	outregs.h.dl = crt_cols;
    }
    inregs.h.dh = outregs.h.dh;
    inregs.h.dl = outregs.h.dl;
    inregs.h.bh = curpage;
    inregs.h.ah = SetCursorPosition;
    int86(BIOS_VIDEO, &inregs, &outregs);
}
static void scrini ( ) { union REGS inregs , outregs ; inregs . h . ah = CurrentVideoState ; int86 ( BIOS_VIDEO , & inregs , & outregs ) ; crt_mode = outregs . h . al ; crt_cols = outregs . h . ah ; crt_lins = 25 ; curpage = outregs . h . bh ; inregs . h . ah = ReadCursorPosition ; inregs . h . bh = curpage ; int86 ( BIOS_VIDEO , & inregs , & outregs ) ; if ( outregs . h . dh > crt_lins ) { outregs . h . dh = crt_lins ; } if ( outregs . h . dl > crt_cols ) { outregs . h . dl = crt_cols ; } inregs . h . dh = outregs . h . dh ; inregs . h . dl = outregs . h . dl ; inregs . h . bh = curpage ; inregs . h . ah = SetCursorPosition ; int86 ( BIOS_VIDEO , & inregs , & outregs ) ; }
Read the state of the video system.
Read the state of the video system .