|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5739 (0x166b) Types: TextFile Notes: UNIX file Names: »banner.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─ ⟦this⟧ »cmd/banner.c«
/* * Banner -- print in large type * td 80.09.24 */ #include <stdio.h> char font[96][9]={ 0000,0000,0000,0000,0000,0000,0000,0000,0000, /* sp */ 0010,0010,0010,0010,0010,0000,0010,0000,0000, /* ! */ 0024,0024,0024,0000,0000,0000,0000,0000,0000, /* " */ 0024,0024,0076,0024,0076,0024,0024,0000,0000, /* # */ 0010,0036,0050,0034,0012,0074,0010,0000,0000, /* $ */ 0060,0062,0004,0010,0020,0046,0006,0000,0000, /* % */ 0010,0024,0024,0030,0052,0044,0032,0000,0000, /* & */ 0010,0010,0020,0000,0000,0000,0000,0000,0000, /* ' */ 0004,0010,0020,0020,0020,0010,0004,0000,0000, /* ( */ 0020,0010,0004,0004,0004,0010,0020,0000,0000, /* ) */ 0000,0010,0052,0034,0052,0010,0000,0000,0000, /* * */ 0000,0010,0010,0076,0010,0010,0000,0000,0000, /* + */ 0000,0000,0000,0000,0000,0030,0030,0010,0020, /* , */ 0000,0000,0000,0076,0000,0000,0000,0000,0000, /* - */ 0000,0000,0000,0000,0000,0030,0030,0000,0000, /* . */ 0001,0002,0004,0010,0020,0040,0100,0000,0000, /* / */ 0034,0042,0046,0052,0062,0042,0034,0000,0000, /* 0 */ 0010,0030,0010,0010,0010,0010,0034,0000,0000, /* 1 */ 0034,0042,0002,0004,0010,0020,0076,0000,0000, /* 2 */ 0076,0004,0010,0004,0002,0042,0034,0000,0000, /* 3 */ 0004,0014,0024,0044,0076,0004,0004,0000,0000, /* 4 */ 0076,0040,0074,0002,0002,0042,0034,0000,0000, /* 5 */ 0014,0020,0040,0074,0042,0042,0034,0000,0000, /* 6 */ 0076,0002,0004,0010,0020,0020,0020,0000,0000, /* 7 */ 0034,0042,0042,0034,0042,0042,0034,0000,0000, /* 8 */ 0034,0042,0042,0036,0002,0004,0030,0000,0000, /* 9 */ 0000,0030,0030,0000,0030,0030,0000,0000,0000, /* : */ 0000,0030,0030,0000,0030,0030,0010,0020,0000, /* ; */ 0002,0004,0010,0020,0010,0004,0002,0000,0000, /* < */ 0000,0000,0076,0000,0076,0000,0000,0000,0000, /* = */ 0040,0020,0010,0004,0010,0020,0040,0000,0000, /* > */ 0034,0042,0002,0004,0010,0000,0010,0000,0000, /* ? */ 0014,0022,0056,0052,0056,0040,0036,0000,0000, /* @ */ 0034,0042,0042,0076,0042,0042,0042,0000,0000, /* A */ 0074,0042,0042,0074,0042,0042,0074,0000,0000, /* B */ 0034,0042,0040,0040,0040,0042,0034,0000,0000, /* C */ 0070,0044,0042,0042,0042,0044,0070,0000,0000, /* D */ 0076,0040,0040,0074,0040,0040,0076,0000,0000, /* E */ 0076,0040,0040,0074,0040,0040,0040,0000,0000, /* F */ 0036,0040,0040,0046,0042,0042,0036,0000,0000, /* G */ 0042,0042,0042,0076,0042,0042,0042,0000,0000, /* H */ 0034,0010,0010,0010,0010,0010,0034,0000,0000, /* I */ 0034,0010,0010,0010,0010,0050,0020,0000,0000, /* J */ 0042,0044,0050,0060,0050,0044,0042,0000,0000, /* K */ 0040,0040,0040,0040,0040,0040,0076,0000,0000, /* L */ 0042,0066,0052,0052,0042,0042,0042,0000,0000, /* M */ 0042,0042,0062,0052,0046,0042,0042,0000,0000, /* N */ 0034,0042,0042,0042,0042,0042,0034,0000,0000, /* O */ 0074,0042,0042,0074,0040,0040,0040,0000,0000, /* P */ 0034,0042,0042,0042,0052,0044,0032,0000,0000, /* Q */ 0074,0042,0042,0074,0050,0044,0042,0000,0000, /* R */ 0034,0042,0040,0034,0002,0042,0034,0000,0000, /* S */ 0076,0010,0010,0010,0010,0010,0010,0000,0000, /* T */ 0042,0042,0042,0042,0042,0042,0034,0000,0000, /* U */ 0042,0042,0042,0024,0024,0010,0010,0000,0000, /* V */ 0042,0042,0042,0052,0052,0052,0024,0000,0000, /* W */ 0042,0042,0024,0010,0024,0042,0042,0000,0000, /* X */ 0042,0042,0024,0010,0010,0010,0010,0000,0000, /* Y */ 0076,0002,0004,0010,0020,0040,0076,0000,0000, /* Z */ 0034,0020,0020,0020,0020,0020,0034,0000,0000, /* [ */ 0100,0040,0020,0010,0004,0002,0001,0000,0000, /* \ */ 0034,0004,0004,0004,0004,0004,0034,0000,0000, /* ] */ 0010,0024,0042,0000,0000,0000,0000,0000,0000, /* ^ */ 0000,0000,0000,0000,0000,0000,0076,0000,0000, /* _ */ 0010,0010,0004,0000,0000,0000,0000,0000,0000, /* ` */ 0000,0000,0034,0002,0036,0042,0036,0000,0000, /* a */ 0040,0040,0074,0042,0042,0042,0074,0000,0000, /* b */ 0000,0000,0030,0044,0040,0044,0030,0000,0000, /* c */ 0002,0002,0036,0042,0042,0042,0036,0000,0000, /* d */ 0000,0000,0034,0042,0076,0040,0034,0000,0000, /* e */ 0014,0022,0070,0020,0020,0020,0020,0000,0000, /* f */ 0000,0000,0032,0046,0042,0046,0032,0002,0034, /* g */ 0040,0040,0074,0042,0042,0042,0042,0000,0000, /* h */ 0010,0000,0030,0010,0010,0010,0034,0000,0000, /* i */ 0004,0000,0004,0004,0004,0004,0004,0044,0030, /* j */ 0040,0040,0044,0050,0064,0042,0042,0000,0000, /* k */ 0030,0010,0010,0010,0010,0010,0034,0000,0000, /* l */ 0000,0000,0064,0052,0052,0052,0052,0000,0000, /* m */ 0000,0000,0074,0042,0042,0042,0042,0000,0000, /* n */ 0000,0000,0034,0042,0042,0042,0034,0000,0000, /* o */ 0000,0000,0054,0062,0042,0062,0054,0040,0040, /* p */ 0000,0000,0032,0046,0042,0046,0032,0002,0002, /* q */ 0000,0000,0054,0062,0040,0040,0040,0000,0000, /* r */ 0000,0000,0036,0040,0034,0002,0074,0000,0000, /* s */ 0020,0020,0070,0020,0020,0022,0014,0000,0000, /* t */ 0000,0000,0042,0042,0042,0046,0032,0000,0000, /* u */ 0000,0000,0042,0042,0042,0024,0010,0000,0000, /* v */ 0000,0000,0042,0042,0052,0052,0024,0000,0000, /* w */ 0000,0000,0042,0024,0010,0024,0042,0000,0000, /* x */ 0000,0000,0042,0042,0042,0046,0032,0002,0034, /* y */ 0000,0000,0076,0004,0010,0020,0076,0000,0000, /* z */ 0014,0020,0020,0040,0020,0020,0014,0000,0000, /* { */ 0010,0010,0010,0000,0010,0010,0010,0000,0000, /* | */ 0030,0004,0004,0002,0004,0004,0030,0000,0000, /* } */ 0020,0052,0004,0000,0000,0000,0000,0000,0000, /* ~ */ 0177,0177,0177,0177,0177,0177,0177,0177,0177, /* del */ }; char line[512]; main(argc, argv) char *argv[]; { register i; if(argc>1) for(i=1;i!=argc;i++){ if(i!=1) putchar('\n'); banner(argv[i]); } else while(gets(line)!=NULL){ putchar('\n'); banner(line); } } banner(line) char *line; { register i, j; register char *s; for(i=0;i!=9;i++){ for(s=line;*s;s++) for(j=0200;j!=0;j>>=1) if(' '<=*s && *s<=0177 && font[*s-' '][i]&j) putchar('x'); else putchar(' '); putchar('\n'); } }