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/beepdown/Makefile Normal file
View File

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

View File

@@ -0,0 +1,19 @@
#include "apilib.h"
void HariMain(void)
{
int i, timer;
timer = api_alloctimer();
api_inittimer(timer, 128);
for (i = 20000000; i >= 20000; i -= i / 100) {
/* 20KHz20Hz即人类可以听到的声音范围*/
/* i以1%的速度递减*/
api_beep(i);
api_settimer(timer, 1); /* 0.01秒*/
if (api_getkey(1) != 128) {
break;
}
}
api_beep(0);
api_end();
}

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

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