Add 28 day code

This commit is contained in:
Yourtion
2016-05-18 10:25:37 +08:00
parent f025b0083f
commit c65ca780b3
137 changed files with 9146 additions and 0 deletions

View File

@@ -0,0 +1 @@
command

View File

@@ -0,0 +1 @@
cmd.exe

5
28_day/lines/Makefile Normal file
View File

@@ -0,0 +1,5 @@
APP = lines
STACK = 1k
MALLOC = 48k
include ../app_make.txt

22
28_day/lines/lines.c Normal file
View File

@@ -0,0 +1,22 @@
#include "apilib.h"
void HariMain(void)
{
char *buf;
int win, i;
api_initmalloc();
buf = api_malloc(160 * 100);
win = api_openwin(buf, 160, 100, -1, "lines");
for (i = 0; i < 8; i++) {
api_linewin(win + 1, 8, 26, 77, i * 9 + 26, i);
api_linewin(win + 1, 88, 26, i * 9 + 88, 89, i);
}
api_refreshwin(win, 6, 26, 154, 90);
for (;;) {
if (api_getkey(1) == 0x0a) {
break; /*按下回车键则break; */
}
}
api_closewin(win);
api_end();
}

1
28_day/lines/make.bat Normal file
View File

@@ -0,0 +1 @@
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9