minor not improvements

This commit is contained in:
Egan Ford 2017-04-16 14:40:25 -06:00
parent e841deb38e
commit ae3876a8f7
5 changed files with 10 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,10 @@
#include <stdio.h>
#define MASK 0x7F
int main()
{
int i, j, k, line, mask = 0x7F;
int i, j, k, line;
char screen[24][40];
// clear screen (just in case partial dump)
@ -13,7 +15,7 @@ int main()
for (i = 0; i < 24; i++) {
line = 8 * (i % 3) + i / 3;
for (j = 0; j < 40; j++)
screen[line][j] = getchar() & mask;
screen[line][j] = getchar() & MASK;
if (i % 3 == 2)
for (k = 0; k < 8; k++)
getchar();

View File

@ -11,16 +11,19 @@ unsigned char holes[] = {
0xc6, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x00
};
#define NORMAL 0x80
#define BLINK 0x40
int main()
{
char c, highbit = 0x80;
char c;
int i, j, k, line = 0;
unsigned char screen[24][40];
// clear screen (just in case < 40x24)
for (i = 0; i < 24; i++)
for (j = 0; j < 40; j++)
screen[i][j] = ' ' | highbit;
screen[i][j] = ' ' | NORMAL;
i = j = 0;
while ((c = getchar()) != EOF) {
@ -37,7 +40,7 @@ int main()
if (i > 23) // ditto
break;
screen[line][j++] = c | highbit;
screen[line][j++] = c | NORMAL;
}
// dump to stdout