forked from yourtion/30dayMakeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APP = sosu | ||
STACK = 2k | ||
MALLOC = 0k | ||
|
||
include ../app_make.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APP = sosu2 | ||
STACK = 11k | ||
MALLOC = 0k | ||
|
||
include ../app_make.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APP = sosu3 | ||
STACK = 1k | ||
MALLOC = 42k | ||
|
||
include ../app_make.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |