Add C examples

Signed-off-by: Junjie Mao <junjie.mao@enight.me>
This commit is contained in:
Junjie Mao 2015-12-01 14:02:00 +08:00
parent 03ffdfec35
commit 7be53f250a
4 changed files with 30 additions and 1 deletions

2
.gitignore vendored
View File

@ -5,7 +5,7 @@ ASMSimulator.iml
*~
*.new
*.old
*.txt
after.txt
cucu-cc
*.o

8
examples/63-c-1.txt Normal file
View File

@ -0,0 +1,8 @@
; 6.3 C example (1)
int main()
{
int i = 3;
int j = 5;
i = i + j;
}

10
examples/64-c-2.txt Normal file
View File

@ -0,0 +1,10 @@
; 6.4 C example (2)
int main()
{
int i = 5;
while(i != 10)
{
i = i + 1;
}
}

11
examples/65-c-3.txt Normal file
View File

@ -0,0 +1,11 @@
; 6.5 C Example (3)
int main()
{
int i = 3;
int j = 5;
if(i != 5)
{
j = 6;
}
}