summaryrefslogtreecommitdiff
path: root/Source/Applications/SampleApps
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-13 18:05:27 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-13 18:05:27 +0100
commit2b9e97b8635c20c5a2b87789b1014489863d1994 (patch)
tree58fa9f2fa82ac9477819193b6731b8b927187224 /Source/Applications/SampleApps
parent7e3ecd80af5ddcedbfa3d849284400ed6568f516 (diff)
downloadMelon-2b9e97b8635c20c5a2b87789b1014489863d1994.tar.gz
Melon-2b9e97b8635c20c5a2b87789b1014489863d1994.zip
Added a game of life simulator demo
Diffstat (limited to 'Source/Applications/SampleApps')
-rw-r--r--Source/Applications/SampleApps/Makefile35
-rw-r--r--Source/Applications/SampleApps/asmdemo.asm30
-rw-r--r--Source/Applications/SampleApps/cxxdemo.cpp20
-rw-r--r--Source/Applications/SampleApps/lib-melonasm.asm24
4 files changed, 0 insertions, 109 deletions
diff --git a/Source/Applications/SampleApps/Makefile b/Source/Applications/SampleApps/Makefile
deleted file mode 100644
index 05f79b1..0000000
--- a/Source/Applications/SampleApps/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-.PHONY: clean, mrproper
-
-ASM = nasm
-ASMFLAGS = -f bin
-
-CXX = g++
-CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND
-
-LD = ld
-LDFLAGS = -T ../../Library/Link.ld -L ../../Library
-
-Applications = asmdemo cxxdemo
-
-all: $(Applications)
- echo "* Done with applications : $(Applications)"
-
-rebuild: mrproper all
-
-%: %.cpp
- echo "* Compiling $<..."
- $(CXX) $(CXXFLAGS) -c $< -o $@.o
- echo "* Linking $@.o..."
- $(LD) $(LDFLAGS) $@.o -o $@
-
-%: %.asm
- echo "* Compiling $<..."
- $(ASM) $(ASMFLAGS) -o $@ $<
-
-clean:
- echo "* Removing object files..."
- rm -rf *.o
-
-mrproper: clean
- echo "* Removing applications..."
- rm -rf $(Applications)
diff --git a/Source/Applications/SampleApps/asmdemo.asm b/Source/Applications/SampleApps/asmdemo.asm
deleted file mode 100644
index d57cc9b..0000000
--- a/Source/Applications/SampleApps/asmdemo.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-%include "lib-melonasm.asm"
-
-start: ; label used for calculating app size
- mov ecx, [data]
- mov ebx, ecx
- mov eax, SC_WHEX
- int 64
- mov eax, SC_PUTCH
- mov ebx, 10
- int 64
-lblloop:
- inc ecx
- mov eax, SC_PUTCH ;temporarily defined for writing one char to screen
- mov ebx, ecx
- int 64
- mov eax, SC_SLEEP ;temporary syscall for sleeping
- mov ebx, 30 ;20ms
- int 64
- cmp ecx, 127
- jnz lblloop
- mov eax, 0
- mov eax, SC_PUTCH
- mov ebx, 10 ;newline
- int 64
- int 66 ;finish task
-
-data:
-dd 0x00000020
-
-end: ; label used for calculating app size
diff --git a/Source/Applications/SampleApps/cxxdemo.cpp b/Source/Applications/SampleApps/cxxdemo.cpp
deleted file mode 100644
index 3d452e7..0000000
--- a/Source/Applications/SampleApps/cxxdemo.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <Syscall/Syscall.wtf.h>
-#include <String.class.h>
-#include <Binding/VirtualTerminal.class.h>
-#include <Binding/Thread.class.h>
-#include <Binding/File.class.h>
-
-int main(const Vector<String>& args) {
- outvt << "Enter some text plz : ";
- String s = invt.readLine();
- outvt << s;
- Thread t = Thread::get();
- for (char c = ' '; c <= 'z'; c++) {
- t.sleep((u32int)c / 4);
- outvt.put(c);
- }
- outvt << "\n";
- outvt << "Salut les gens ! c'est le progrès !!!\nLe boeuf mort est juste là : ";
- outvt << 0xDEADBEEF;
- outvt << "\n";
-}
diff --git a/Source/Applications/SampleApps/lib-melonasm.asm b/Source/Applications/SampleApps/lib-melonasm.asm
deleted file mode 100644
index 0845770..0000000
--- a/Source/Applications/SampleApps/lib-melonasm.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-[bits 32]
-
-%ifidn __OUTPUT_FORMAT__, bin
-; create a MelonBinary output
-
-%define MEM_ORIGIN 0x10000000
-
-dd 0xFEEDBEEF ; magic number ^^
-dd end - start
-dd MEM_ORIGIN
-
-; the ($-$$) permits not taking into account the header above
-[org MEM_ORIGIN - ($-$$)]
-
-%elifidn __OUTPUT_FORMAT__, elf
-; create an elf object
-
-[global start]
-
-%endif
-
-%define SC_PUTCH 0xFFFFFF01
-%define SC_SLEEP 0xFFFFFF02
-%define SC_WHEX 0xFFFFFF03