|
|
DataMuseum.dkPresents historical artifacts from the history of: ICL Comet 32 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about ICL Comet 32 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1966 (0x7ae)
Types: TextFile
Notes: UNIX file
Names: »graph.old«
└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
└─⟦28c352965⟧ »/a« UNIX Filesystem
└─⟦this⟧ »usr/src/gks/h/graph.old«
/*
* Graphic routines
*/
#include <sys/types.h>
#include <stdio.h>
#include <vfont.h>
#include <sys/devvm.h>
#define PIXEL_SIZE 8
#define ALL 8
#define NNN (u_int *)0
#define LINESIZE 80 /* word size of line */
#define BLKSIZE 256
#define RAMSIZE (256*BLKSIZE) /* word size of whole ram */
#define RAMSTART (8192*RAMSIZE) /* room for up & down scrolls */
#define BIGBLOB 0201 /* gives character box size */
#define GREENCURSOR (1<<0)
#define DISPLAY (1<<4)
#define HIGHSPEED (1<<5)
#define YSIZE 399
#define abs(x) (x>=0 ? x : -(x))
#define min(a,b) (a>b ? b:a)
#define elif else if
#define Phys_RAM 0xe00000L /* physical graphics ram */
#define Phys_MPS 0xfff800L /* physical control page */
typedef enum {
BLACK, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, WHITE
} colour;
typedef struct {
int x,y;
} point;
typedef struct {
point low; /* minimum x,y. Lower left */
point high; /* maximum x,y. Upper rigth */
} rectangle;
typedef struct {
u_int *base; /* pointer to int that include u. left*/
u_int width; /* number of long across scan line */
rectangle rect; /* coordinates of clipping rectangle */
} bitmap;
static int gramstart; /* word offset of current page */
static bitmap display = {(u_int *)GB_VideoRAM, 80, 0, 0, 639, 399};
static u_int *vram;
static colour lcol = {GREEN};
static colour mcol = {GREEN};
static colour tcol = {GREEN};
static int cheight = {1};
static u_int color[8][8];
static chardes *finfo; /* character descriptors */
static unsigned char *fbase; /* character bitmaps */
static chardes *blp; /* pointer to BIGBLOB */
static int Fh;
static int tmask[]={
0x01,
0x02,
0x04,
0x08
};
static u_int gmask[]={
0xfefefeffL,
0xfdfdfdffL,
0xfbfbfbffL,
0xf7f7f7ffL,
0xefefefffL,
0xdfdfdfffL,
0xbfbfbfffL,
0x7f7f7fffL,
0x000000ffL
};
static u_int fullcol[]={
0x00000000L,
0x0000ff00L,
0x00ff0000L,
0x00ffff00L,
0xff000000L,
0xff00ff00L,
0xffff0000L,
0xffffff00L
};