# HG changeset patch # User John Tsiombikas # Date 1311582597 -10800 # Node ID 7bc74736c7e872679176284c8d86e4c8a3db03dd # Parent 5f6c5751ae0515f78cf9254072411bc8aa1d6a02 added the first test process code and system call numbers header diff -r 5f6c5751ae05 -r 7bc74736c7e8 src/sysnum.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sysnum.h Mon Jul 25 11:29:57 2011 +0300 @@ -0,0 +1,10 @@ +#ifndef SYSNUM_H_ +#define SYSNUM_H_ + +#define SYSCALL_INT 0x80 + +#define SYS_EXIT 0 +#define SYS_HELLO 1 +#define SYS_SLEEP 2 + +#endif /* SYSNUM_H_ */ diff -r 5f6c5751ae05 -r 7bc74736c7e8 src/test_proc.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test_proc.S Mon Jul 25 11:29:57 2011 +0300 @@ -0,0 +1,18 @@ +#include + + .text + .globl test_proc +test_proc: + /* --- print a message --- */ + movl $SYS_HELLO, %eax + int $SYSCALL_INT + + /* --- sleep for 5 seconds --- */ + movl $SYS_SLEEP, %eax + movl $5, %ebx + int $SYSCALL_INT + + jmp test_proc + + .globl test_proc_end +test_proc_end: