forked from backup/30dayMakeOS
alloca(1)
This commit is contained in:
@@ -19,7 +19,8 @@ haribote.img : haribote/ipl10.bin haribote/haribote.sys Makefile \
|
||||
winhelo/winhelo.hrb winhelo2/winhelo2.hrb winhelo3/winhelo3.hrb \
|
||||
star1/star1.hrb stars/stars.hrb stars2/stars2.hrb \
|
||||
lines/lines.hrb walk/walk.hrb noodle/noodle.hrb \
|
||||
beepdown/beepdown.hrb color/color.hrb color2/color2.hrb
|
||||
beepdown/beepdown.hrb color/color.hrb color2/color2.hrb \
|
||||
sosu/sosu.hrb sosu3/sosu3.hrb
|
||||
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
|
||||
wbinimg src:haribote/ipl10.bin len:512 from:0 to:0 \
|
||||
copy from:haribote/haribote.sys to:@: \
|
||||
@@ -41,6 +42,8 @@ haribote.img : haribote/ipl10.bin haribote/haribote.sys Makefile \
|
||||
copy from:beepdown/beepdown.hrb to:@: \
|
||||
copy from:color/color.hrb to:@: \
|
||||
copy from:color2/color2.hrb to:@: \
|
||||
copy from:sosu/sosu.hrb to:@: \
|
||||
copy from:sosu3/sosu3.hrb to:@: \
|
||||
imgout:haribote.img
|
||||
|
||||
#命令
|
||||
@@ -73,6 +76,8 @@ full :
|
||||
$(MAKE) -C beepdown
|
||||
$(MAKE) -C color
|
||||
$(MAKE) -C color2
|
||||
$(MAKE) -C sosu
|
||||
$(MAKE) -C sosu3
|
||||
$(MAKE) haribote.img
|
||||
|
||||
run_full :
|
||||
@@ -114,6 +119,8 @@ clean_full :
|
||||
$(MAKE) -C beepdown clean
|
||||
$(MAKE) -C color clean
|
||||
$(MAKE) -C color2 clean
|
||||
$(MAKE) -C sosu clean
|
||||
$(MAKE) -C sosu3 clean
|
||||
|
||||
src_only_full :
|
||||
$(MAKE) -C haribote src_only
|
||||
@@ -134,6 +141,8 @@ src_only_full :
|
||||
$(MAKE) -C beepdown src_only
|
||||
$(MAKE) -C color src_only
|
||||
$(MAKE) -C color2 src_only
|
||||
$(MAKE) -C sosu src_only
|
||||
$(MAKE) -C sosu3 src_only
|
||||
-$(DEL) haribote.img
|
||||
|
||||
refresh :
|
||||
|
||||
1
28_day/sosu/!cons_9x.bat
Normal file
1
28_day/sosu/!cons_9x.bat
Normal file
@@ -0,0 +1 @@
|
||||
command
|
||||
1
28_day/sosu/!cons_nt.bat
Normal file
1
28_day/sosu/!cons_nt.bat
Normal file
@@ -0,0 +1 @@
|
||||
cmd.exe
|
||||
5
28_day/sosu/Makefile
Normal file
5
28_day/sosu/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
APP = sosu
|
||||
STACK = 2k
|
||||
MALLOC = 0k
|
||||
|
||||
include ../app_make.txt
|
||||
1
28_day/sosu/make.bat
Normal file
1
28_day/sosu/make.bat
Normal file
@@ -0,0 +1 @@
|
||||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
24
28_day/sosu/sosu.c
Normal file
24
28_day/sosu/sosu.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include "apilib.h"
|
||||
|
||||
#define MAX 1000
|
||||
|
||||
void HariMain(void)
|
||||
{
|
||||
char flag[MAX], s[8];
|
||||
int i, j;
|
||||
for (i = 0; i < MAX; i++) {
|
||||
flag[i] = 0;
|
||||
}
|
||||
for (i = 2; i < MAX; i++) {
|
||||
if (flag[i] == 0) {
|
||||
/*没有标记的为质数*/
|
||||
sprintf(s, "%d ", i);
|
||||
api_putstr0(s);
|
||||
for (j = i * 2; j < MAX; j += i) {
|
||||
flag[j] = 1; /*给它的倍数做上标记*/
|
||||
}
|
||||
}
|
||||
}
|
||||
api_end();
|
||||
}
|
||||
1
28_day/sosu2/!cons_9x.bat
Normal file
1
28_day/sosu2/!cons_9x.bat
Normal file
@@ -0,0 +1 @@
|
||||
command
|
||||
1
28_day/sosu2/!cons_nt.bat
Normal file
1
28_day/sosu2/!cons_nt.bat
Normal file
@@ -0,0 +1 @@
|
||||
cmd.exe
|
||||
5
28_day/sosu2/Makefile
Normal file
5
28_day/sosu2/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
APP = sosu2
|
||||
STACK = 11k
|
||||
MALLOC = 0k
|
||||
|
||||
include ../app_make.txt
|
||||
1
28_day/sosu2/make.bat
Normal file
1
28_day/sosu2/make.bat
Normal file
@@ -0,0 +1 @@
|
||||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
24
28_day/sosu2/sosu2.c
Normal file
24
28_day/sosu2/sosu2.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include "apilib.h"
|
||||
|
||||
#define MAX 10000
|
||||
|
||||
void HariMain(void)
|
||||
{
|
||||
char flag[MAX], s[8];
|
||||
int i, j;
|
||||
for (i = 0; i < MAX; i++) {
|
||||
flag[i] = 0;
|
||||
}
|
||||
for (i = 2; i < MAX; i++) {
|
||||
if (flag[i] == 0) {
|
||||
/*没有标记的为质数*/
|
||||
sprintf(s, "%d ", i);
|
||||
api_putstr0(s);
|
||||
for (j = i * 2; j < MAX; j += i) {
|
||||
flag[j] = 1; /*给它的倍数做上标记*/
|
||||
}
|
||||
}
|
||||
}
|
||||
api_end();
|
||||
}
|
||||
1
28_day/sosu3/!cons_9x.bat
Normal file
1
28_day/sosu3/!cons_9x.bat
Normal file
@@ -0,0 +1 @@
|
||||
command
|
||||
1
28_day/sosu3/!cons_nt.bat
Normal file
1
28_day/sosu3/!cons_nt.bat
Normal file
@@ -0,0 +1 @@
|
||||
cmd.exe
|
||||
5
28_day/sosu3/Makefile
Normal file
5
28_day/sosu3/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
APP = sosu3
|
||||
STACK = 1k
|
||||
MALLOC = 42k
|
||||
|
||||
include ../app_make.txt
|
||||
1
28_day/sosu3/make.bat
Normal file
1
28_day/sosu3/make.bat
Normal file
@@ -0,0 +1 @@
|
||||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
26
28_day/sosu3/sosu3.c
Normal file
26
28_day/sosu3/sosu3.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include "apilib.h"
|
||||
|
||||
#define MAX 10000
|
||||
|
||||
void HariMain(void)
|
||||
{
|
||||
char *flag, s[8];
|
||||
int i, j;
|
||||
api_initmalloc();
|
||||
flag = api_malloc(MAX);
|
||||
for (i = 0; i < MAX; i++) {
|
||||
flag[i] = 0;
|
||||
}
|
||||
for (i = 2; i < MAX; i++) {
|
||||
if (flag[i] == 0) {
|
||||
/*没有标记的为质数*/
|
||||
sprintf(s, "%d ", i);
|
||||
api_putstr0(s);
|
||||
for (j = i * 2; j < MAX; j += i) {
|
||||
flag[j] = 1; /*给它的倍数做上标记*/
|
||||
}
|
||||
}
|
||||
}
|
||||
api_end();
|
||||
}
|
||||
Reference in New Issue
Block a user