summaryrefslogtreecommitdiff
path: root/userspace
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-04 00:53:30 +0200
committerMiguel <m.i@gmx.at>2018-10-04 00:53:30 +0200
commitce16fe524c14ccaae67fb634105da5aef08ead48 (patch)
tree03990f29389bd4c55f40b804b809c7060c24c739 /userspace
parenta455cd5af26bf8731e7c981a9421b16ab34dae6f (diff)
moving framebuffer access completely to userspace
Diffstat (limited to 'userspace')
-rw-r--r--userspace/crt0.s4
-rw-r--r--userspace/init.c11
2 files changed, 13 insertions, 2 deletions
diff --git a/userspace/crt0.s b/userspace/crt0.s
index 26ad47c..dedc86c 100644
--- a/userspace/crt0.s
+++ b/userspace/crt0.s
@@ -19,10 +19,10 @@ jne copy
pop %ecx
pop %ebx
-# environment adress was passed on stack
-
movl $0xf5000000, _impure_ptr
+# environment adress was passed on stack
+
pop %eax
mov %eax, environ
diff --git a/userspace/init.c b/userspace/init.c
index 0a3b870..d130bc8 100644
--- a/userspace/init.c
+++ b/userspace/init.c
@@ -1,11 +1,22 @@
#include <stdio.h>
#include <time.h>
+#include "put_pixel.h"
int main(int argc, char **argv)
{
+
+ // int x=10/0; // provoke divide by zero
+
+ uint8_t *mem=0xf6000000;
+ *mem='a';
+ while(1);
+
char *argv1[]={"/bin/fsh",0};
char *env1[]={"HOME=/home/miguel","PS1=\033[34m$\033[37m","PWD=/home/miguel","PATH=/bin","TERM=fool-term",0};
+
+
+
// loop forever and spawn shells if the top-shell exits
while(1)
{