跳到主要内容

附录 I:设备 - GRINNELL(DEV)

名称​

grinnell - 彩色显示器

概要​

DCT grndout
setdct("grndout", 03000, 0172520, 0172522,
grnoi, grnot, grnoti, &grndin);
DCT grndin
setdct("grndin", 03000, 0172524, 0172526,
grnoi, grnot, grnoti, &grndout);

说明​

Grinnell 彩色显示器的屏幕为 512x512 像素。可使用三种颜色(红、绿、蓝),但不支持灰度。有三种图形模式可用:

(1) 字母数字模式(Alphanumeric):输入的 ASCII 字符显示在屏幕的选定位置。

(2) 图形模式(Graphic):通过图形命令绘制线、矩形等基本几何元素。

(3) 图像模式(Image):输入数据被解释为位模式,并显示相应的图像。

构造命令所用的值在 Grinnell 用户手册中有描述,也列在下面。

#define LDC     0100000   /* Load Display Channels */

#define LSM 0010000 /* Load Subchannel Mask */
#define RED 0000010 /* Read Subchannel */
#define GREEN 0000020 /* Green subchannel */
#define BLUE 0000040 /* Blue subchannel */

#define WID 0000000 /* Write Image Data */
#define WGD 0020000 /* Write Graphic Data */
#define WAC 0022000 /* Write AlphanumCh */

#define LWM 0024000 /* Load Write Mode */
#define REVERSE 0200 /* Reverse Background */
#define ADDITIVE 0100 /* Additive (not Replace) */
#define ZEROWRITE 040 /* Dark Write */
#define VECTOR 020 /* Select Vector Graph */
#define DBLEHITE 010 /* Double Height write */
#define DBLEWIDTH 004 /* Double Width write */
#define CURSORAB 002 /* Cursor (La+Lb,Ea+Eb) */
#define CURSORON 001 /* Cursor On */

#define LUM 0026000 /* Load Update Mode */
#define Ec 001 /* Load Ea with Ec */
#define Ea_Eb 002 /* Load Ea with Ea + Eb */
#define Ea_Ec 003 /* load Ea with Ea + Ec */
#define Lc 004 /* Load La with Lc */
#define La_Lb 010 /* Load La with La + Lb */
#define La_Lc 014 /* Load La with La + Lc */
#define SRCL_HOME 020 /* Scroll dsiplay to HOME */
#define SRCL_DOWN 040 /* Scroll down one line */
#define SCRL_UP 060 /* Scroll up one line */

#define ERS 0030000 /* Erase */
#define ERL 0032000 /* Erase Line */
#define SLU 0034000 /* Special Location Update */
#define SCRL_ZAP 0100 /* unlimited scroll speed */

#define EGW 0036000 /* Execute Graphic Write */
#define LER 0040000 /* Load Ea relative */
#define LEA 0044000 /* Load Ea */
#define LEB 0050000 /* Load Eb */
#define LEC 0054000 /* Load Ec */
#define LLR 0060000 /* Load La Relative */
#define LLA 0064000 /* Load La */
#define LLB 0070000 /* Load Lb */
#define LLC 0074000 /* Load Lc */
#define LGW 02000 /* perform write */

#define NOP 0110000 /* No-Operation */

#define SPD 0120000 /* Select Special Device */
#define LPA 0130000 /* Load Peripheral Address */
#define LPR 0140000 /* Load Peripheral Register */
#define LPD 0150000 /* Load Peripheral Data */
#define RPD 0160000 /* ReadBack Peripheral Data */
#define MEMRB 00400 /* SPD - Memory Read-Back */
#define DATA 01000 /* SPD - Byte Unpacking */
#define ALPHA 06000 /* LPR - Alphanumeric data */
#define GRAPH 04000 /* LPR - Graphic data */
#define IMAGE 02000 /* LPR - Image data */
#define LTHENH 01000 /* take lo byte then hi byte */
#define DROPBYTE 0400 /* drop last byte */
#define INTERR 02000 /* SPD - Interrupt Enable */
#define TEST 04000 /* SPD - Diagnostic Test */

MOS 驱动程序名为 grin.obj,它对以下 IORB 条目进行操作。

iruva

指向存放数据的缓冲区的指针。

这些数据必须已为 Grinnell 格式化好,因为驱动程序不进行任何转换。

irbr

传输长度,以正的字节数表示。

Grinnell 的寻址:每行由编号 0 到 511、从左到右排列的元素组成,行号为 0 到 511,从下到上排列。因此它按常规的 X-Y 坐标系寻址。注意,这一坐标系与图像所用的坐标系不同。

   X A
|
| (511, 511)
511 +-------------------------------+
| |
| |
| |
| |
| (x, y) |
| + |
| |
| |
| |
| |
| |
+-------------------------------+----->
0 511 Y

另请参阅​

grinnell(fax)