all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 1958a19d6281383c472637a1b68e52c6a6d3d9df 1373 bytes (raw)
name: test/etags/cp-src/screen.cpp 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 
/* ======================================================================= */
/*                                SCREEN.CPP                               */
/* ======================================================================= */

#include "stdio.h"
#include "stdlib.h"
#include "dos.h"

#include "screen.h"

/* ----------------------------------------------------------------------- */
/*              Cursor Position and Screen Buffering Functions             */
/* ----------------------------------------------------------------------- */

unsigned char cursor_x, cursor_y;
static union REGS regs;

void goto_xy(unsigned char x, unsigned char y)
    {
    regs.h.ah = 2;
    regs.h.bh = 0;
    regs.h.dh = y;
    regs.h.dl = x;
    int86(0x10, &regs, &regs);
    }

void hide_cursor(void)
    {
    goto_xy(0, NUM_ROWS);
    }

void cursor_position(void)
    {
    regs.h.ah = 3;
    regs.h.bh = 0;
    int86(0x10, &regs, &regs);
    cursor_x = regs.h.dl;
    cursor_y = regs.h.dh;
    }

void clear_screen(void)
    {
    unsigned int i, j;
    char far *p;

    p = SCREEN_START;
    for (i = 0; i < NUM_ROWS; i++)
        for (j = 0; j < 80; j++)
            {
            *p++ = ' ';
            *p++ = LIGHTGRAY;
            }
    }

void write_xyc(int x, int y, char c)
    {
    char far *p;

    p = SCREEN_FP(x, y);
    *p++ = c;
    *p = LIGHTGRAY;
    }

debug log:

solving 1958a19d6281383c472637a1b68e52c6a6d3d9df ...
found 1958a19d6281383c472637a1b68e52c6a6d3d9df in https://git.savannah.gnu.org/cgit/emacs.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.