157097Sakito /*
257097Sakito * Copyright (c) 1992 OMRON Corporation.
3*63199Sbostic * Copyright (c) 1992, 1993
4*63199Sbostic * The Regents of the University of California. All rights reserved.
557097Sakito *
657097Sakito * This code is derived from software contributed to Berkeley by
757097Sakito * OMRON Corporation.
857097Sakito *
957097Sakito * %sccs.include.redist.c%
1057097Sakito *
11*63199Sbostic * @(#)screen.c 8.1 (Berkeley) 06/10/93
1257097Sakito */
1357097Sakito
1457097Sakito /*
1557097Sakito * screen.c -- screen handler
1657097Sakito * by A.Fujita, Jun-17-1992
1757097Sakito */
1857097Sakito
1957097Sakito #include <sys/param.h>
2057097Sakito #include <luna68k/stand/status.h>
2157097Sakito
2257097Sakito int
screen(argc,argv)2357097Sakito screen(argc, argv)
2457097Sakito int argc;
2557097Sakito char *argv[];
2657097Sakito {
2757097Sakito int i, j, flag;
2857097Sakito register char *p;
2957097Sakito short hcnt, vcnt;
3057097Sakito
3157097Sakito if (!strcmp(argv[1], "clear")) {
3257097Sakito bmdclear();
3357097Sakito } else if (!strcmp(argv[1], "adjust")) {
3457097Sakito hcnt = vcnt = 0;
3557097Sakito
3657097Sakito flag = 0;
3757097Sakito for (p = argv[2] ; *p != '\0'; p++) {
3857097Sakito if (*p == '-')
3957097Sakito flag++;
4057097Sakito else
4157097Sakito hcnt = (hcnt * 10) + (*p - 0x30);
4257097Sakito }
4357097Sakito if (flag)
4457097Sakito hcnt = -1 * hcnt;
4557097Sakito
4657097Sakito flag = 0;
4757097Sakito for (p = argv[3] ; *p != '\0'; p++) {
4857097Sakito if (*p == '-')
4957097Sakito flag++;
5057097Sakito else
5157097Sakito vcnt = (vcnt * 10) + (*p - 0x30);
5257097Sakito }
5357097Sakito if (flag)
5457097Sakito vcnt = -1 * vcnt;
5557097Sakito
5657097Sakito bmdadjust(hcnt, vcnt);
5757097Sakito } else if (!strcmp(argv[1], "number")) {
5857097Sakito for (j = 0; j < 50; j++)
5957097Sakito for (i = 0; i < 10; i++)
6057097Sakito bmdputc( 0x30 + i );
6157097Sakito
6257097Sakito } else if (!strcmp(argv[1], "alpha")) {
6357097Sakito for (j = 0; j < 26; j++) {
6457097Sakito for (i = 0; i < 90; i++) {
6557097Sakito bmdputc(0x41 + j);
6657097Sakito }
6757097Sakito bmdputc(0x0D);
6857097Sakito bmdputc(0x0A);
6957097Sakito }
7057097Sakito }
7157097Sakito
7257097Sakito return(ST_NORMAL);
7357097Sakito }
74