From ce16fe524c14ccaae67fb634105da5aef08ead48 Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 4 Oct 2018 00:53:30 +0200 Subject: moving framebuffer access completely to userspace --- userspace/crt0.s | 4 ++-- userspace/init.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'userspace') 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 #include +#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) { -- cgit v1.2.3