diff options
| author | Miguel <m.i@gmx.at> | 2018-10-10 10:15:49 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-10 10:15:49 +0200 |
| commit | e9495844291a85a1f7ba3c76742a0dd1bf574e5f (patch) | |
| tree | a0d2ba779ed8e471758a77745250731a1596182b /interface | |
| parent | 63e5017d9863d4ed215782e469e8ee2c6ff8473d (diff) | |
hosted gcc compiler
Diffstat (limited to 'interface')
| -rw-r--r-- | interface/Makefile | 4 | ||||
| -rw-r--r-- | interface/crt0.s | 20 |
2 files changed, 21 insertions, 3 deletions
diff --git a/interface/Makefile b/interface/Makefile new file mode 100644 index 0000000..1cefd39 --- /dev/null +++ b/interface/Makefile @@ -0,0 +1,4 @@ +AS=i686-foolos-as + +clean: + rm -f *.o diff --git a/interface/crt0.s b/interface/crt0.s index dedc86c..0b833c0 100644 --- a/interface/crt0.s +++ b/interface/crt0.s @@ -2,12 +2,26 @@ _start: -# copy reent to this page push %ebx push %ecx +cmp $0,_impure_ptr +jne skipzero + +movl $0xf5000000, _impure_ptr +mov $0xf5000000,%ebx + +allzero: +movl $0, (%ebx) +add $4, %ebx +cmp $0xf5001000,%ebx +jne allzero + +skipzero: + mov _impure_ptr,%eax mov $0xf5000000,%ebx + copy: mov (%eax),%ecx mov %ecx,(%ebx) @@ -16,11 +30,11 @@ add $4, %eax cmp $0xf5001000,%ebx jne copy +movl $0xf5000000, _impure_ptr + pop %ecx pop %ebx -movl $0xf5000000, _impure_ptr - # environment adress was passed on stack pop %eax |
