home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------ */
- /* CONIO2.C */ */
- /* Erweiterung der QuickC-Bibliothek "conio" */
- /* um Turbo C-Funktionen */
- /* (c) 1990 Michael Rother & TOOLBOX */
- /* ------------------------------------------------------ */
- #include <bios.h>
- #include <graph.h>
- #include <conio2.h>
-
- short wherex(void)
- {
- struct rccoord koord;
- koord = _gettextposition();
- return (koord.col);
- }
-
- short wherey(void)
- {
- struct rccoord koord;
- koord = _gettextposition();
- return (koord.row);
- }
-
- void gotoxy(short x, short y)
- {
- _settextposition (y, x);
- }
-
- void clrscr(void)
- {
- _asm {
- mov ah, 0Fh
- int 10h
- mov ah, 0
- int 10h
- }
- }
-
- void clreol(void)
- {
- short x;
- union REGS regs;
-
- x = wherex();
- regs.h.ah = 10;
- regs.h.al = 32;
- regs.h.bh = NULLI;
- regs.h.cl = ((MAXSPALTE + 1) - (--x));
- regs.h.ch = NULLI;
-
- int86 (0x10, ®s, ®s);
- }
-
- void delline(void)
- {
- union REGS regs;
-
- regs.h.ah = 6;
- regs.h.al = EINSI;
- regs.h.ch = (unsigned char) wherex();
- regs.h.cl = NULLI;
- regs.h.dh = MAXZEILE;
- regs.h.dl = MAXSPALTE;
- regs.h.bh = NULLI;
-
- int86 (0x10, ®s, ®s);
- }
-
- void insline(void)
- {
- union REGS regs;
-
- regs.h.ah = 7;
- regs.h.al = EINSI;
- regs.h.ch = (unsigned char) wherex();
- regs.h.cl = NULLI;
- regs.h.dh = MAXZEILE;
- regs.h.dl = MAXSPALTE;
- regs.h.bh = NULLI;
-
- int86 (0x10, ®s, ®s);
- }
- /* ------------------------------------------------------ */
- /* Ende von CONIO2.C */
-