1*57097Sakito /* 2*57097Sakito * Copyright (c) 1992 OMRON Corporation. 3*57097Sakito * Copyright (c) 1992 The Regents of the University of California. 4*57097Sakito * All rights reserved. 5*57097Sakito * 6*57097Sakito * This code is derived from software contributed to Berkeley by 7*57097Sakito * OMRON Corporation. 8*57097Sakito * 9*57097Sakito * %sccs.include.redist.c% 10*57097Sakito * 11*57097Sakito * @(#)screen.c 7.1 (Berkeley) 12/13/92 12*57097Sakito */ 13*57097Sakito 14*57097Sakito /* 15*57097Sakito * screen.c -- screen handler 16*57097Sakito * by A.Fujita, Jun-17-1992 17*57097Sakito */ 18*57097Sakito 19*57097Sakito #include <sys/param.h> 20*57097Sakito #include <luna68k/stand/status.h> 21*57097Sakito 22*57097Sakito int 23*57097Sakito screen(argc, argv) 24*57097Sakito int argc; 25*57097Sakito char *argv[]; 26*57097Sakito { 27*57097Sakito int i, j, flag; 28*57097Sakito register char *p; 29*57097Sakito short hcnt, vcnt; 30*57097Sakito 31*57097Sakito if (!strcmp(argv[1], "clear")) { 32*57097Sakito bmdclear(); 33*57097Sakito } else if (!strcmp(argv[1], "adjust")) { 34*57097Sakito hcnt = vcnt = 0; 35*57097Sakito 36*57097Sakito flag = 0; 37*57097Sakito for (p = argv[2] ; *p != '\0'; p++) { 38*57097Sakito if (*p == '-') 39*57097Sakito flag++; 40*57097Sakito else 41*57097Sakito hcnt = (hcnt * 10) + (*p - 0x30); 42*57097Sakito } 43*57097Sakito if (flag) 44*57097Sakito hcnt = -1 * hcnt; 45*57097Sakito 46*57097Sakito flag = 0; 47*57097Sakito for (p = argv[3] ; *p != '\0'; p++) { 48*57097Sakito if (*p == '-') 49*57097Sakito flag++; 50*57097Sakito else 51*57097Sakito vcnt = (vcnt * 10) + (*p - 0x30); 52*57097Sakito } 53*57097Sakito if (flag) 54*57097Sakito vcnt = -1 * vcnt; 55*57097Sakito 56*57097Sakito bmdadjust(hcnt, vcnt); 57*57097Sakito } else if (!strcmp(argv[1], "number")) { 58*57097Sakito for (j = 0; j < 50; j++) 59*57097Sakito for (i = 0; i < 10; i++) 60*57097Sakito bmdputc( 0x30 + i ); 61*57097Sakito 62*57097Sakito } else if (!strcmp(argv[1], "alpha")) { 63*57097Sakito for (j = 0; j < 26; j++) { 64*57097Sakito for (i = 0; i < 90; i++) { 65*57097Sakito bmdputc(0x41 + j); 66*57097Sakito } 67*57097Sakito bmdputc(0x0D); 68*57097Sakito bmdputc(0x0A); 69*57097Sakito } 70*57097Sakito } 71*57097Sakito 72*57097Sakito return(ST_NORMAL); 73*57097Sakito } 74