mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-04-26 03:31:32 +08:00
Add 28 day code
This commit is contained in:
1
28_day/lines/!cons_9x.bat
Normal file
1
28_day/lines/!cons_9x.bat
Normal file
@@ -0,0 +1 @@
|
||||
command
|
||||
1
28_day/lines/!cons_nt.bat
Normal file
1
28_day/lines/!cons_nt.bat
Normal file
@@ -0,0 +1 @@
|
||||
cmd.exe
|
||||
5
28_day/lines/Makefile
Normal file
5
28_day/lines/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
APP = lines
|
||||
STACK = 1k
|
||||
MALLOC = 48k
|
||||
|
||||
include ../app_make.txt
|
||||
22
28_day/lines/lines.c
Normal file
22
28_day/lines/lines.c
Normal 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
1
28_day/lines/make.bat
Normal file
@@ -0,0 +1 @@
|
||||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
Reference in New Issue
Block a user