hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/sysroot
diff options
context:
space:
mode:
Diffstat (limited to 'sysroot')
-rw-r--r--sysroot/etc/lung79
-rw-r--r--sysroot/etc/motd1
-rw-r--r--sysroot/etc/profile8
-rw-r--r--sysroot/usr/include/fcntl.h12
-rw-r--r--sysroot/usr/include/stddef.h9
-rw-r--r--sysroot/usr/include/stdint.h10
-rw-r--r--sysroot/usr/include/stdio.h15
-rw-r--r--sysroot/usr/include/stdlib.h17
-rw-r--r--sysroot/usr/include/string.h17
-rw-r--r--sysroot/usr/include/sys/syscall.h34
-rw-r--r--sysroot/usr/include/unistd.h18
-rw-r--r--sysroot/usr/lib/libc/crt0.c28
-rw-r--r--sysroot/usr/lib/libc/stdio.c211
-rw-r--r--sysroot/usr/lib/libc/stdlib.c185
-rw-r--r--sysroot/usr/lib/libc/string.c92
-rw-r--r--sysroot/usr/lib/libc/syscalls.c38
-rw-r--r--sysroot/usr/share/acorn8.psfbin0 -> 2052 bytes
-rw-r--r--sysroot/usr/share/dejavu.ttfbin0 -> 8488 bytes
-rw-r--r--sysroot/usr/share/pearl8.psfbin0 -> 2052 bytes
-rw-r--r--sysroot/usr/share/sun16.psfbin0 -> 4100 bytes
-rw-r--r--sysroot/usr/share/terminess.ttfbin0 -> 9496 bytes
-rw-r--r--sysroot/usr/share/vga16.psfbin0 -> 4100 bytes
-rw-r--r--sysroot/usr/share/vga8.psfbin0 -> 2052 bytes
23 files changed, 774 insertions, 0 deletions
diff --git a/sysroot/etc/lung b/sysroot/etc/lung
new file mode 100644
index 0000000..54c10ab
--- /dev/null
+++ b/sysroot/etc/lung
@@ -0,0 +1,79 @@
+(((())))11111{{{}}}}}}[[[]]]]]]]-------_______)juvvvvvvvvvvvvvvvvvvvvvuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvccccccvvvvvvccccccccccccccccccccccccccvvvvvvuuuuuuuuuuuuuuuunnnnnnnnnnnxxxxxxxxxxxxxxxrrrrrrrrrrrrrrrrrrrrrrrrjjjjjjjjjffjf)][}}
+||(((()))11111{{{{}}}}}[[[]]]]]]????----______-{tuuuuuuvvvvvvvvvvvvvvuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvccccccvvvvvvcccccccccccccccccccccccvvvvvvvvvuuuuuuuuuuuuunnnnnnnnnnnxxxxxxxxxxxxxxrrrrrrrrrrrrrrrrrrrjjjjjjjjjjjjjjjjjjff/{-_-][
+|||||(((()))111111{{}}}[[[[[[]]]]]??----________[fnuuuuuuuuuuuuuvvvvvvuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvcccccccccccccccccccccccccvvvccccccvvvvvvvvvuuuuuuuuuunnnnnnnnnnnnnnxxxxxxrrrrrrrrrrrrrrjjjjjjjjjrjjjjjjjjjjjjjjjjjjjjffft)~+[{{1
+\\\|||((())))1111111{{{}}[[[[[]]]]??----_________]|xuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvvcccccccccccccccccccccccccvvvvvvvvvuuuuuuuuuuuuuuuunnnnnnnnnnnnnxxxxxxxxrrrrrrrrrrrrrrrjjjjjjjjjjjjjjjjjjjjjjjjjjjjjffftf\}<+{)))
+\\\\\||||(()))1111111{{{}}}}[[[[]]??----________+_?(ruuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvvvcccccccccccccccccccccvvvvvuuunnnnnnuuuuuuuuuuuuunnnnnnnnnnnnnnnxxxxxxrrrrrrrrrrrrrjjjjjjjjjjjjjjjjjfffffffffffjjjffffft/{~I~{||(
+/\\\\\\||((())))111111{{{}}}[[[[]]??-----_____+++++_1fnnnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvuvvvvvvvvvvvvvcvvvvvvvvvvuuuuvvvvvuuuuunnnnnnnnnnnnnnnnnnnnnnnnnnnnnnxxxxxxxxxxxxrrrrrjjjjjjjjjjjjjjjjjjjjjjjjffffffffffffffffffftt\(]+<?)//\
+//\\\\\\\|||(((()))11111{{{}[[[[[]]]?------__++++++++{txnunnnnnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvuuuuuunnnnnnnuuunnnnnnnnnnnnnnnnnnnnnnxxxxxxxxxxxnxxxxxxxrrrrrrrrjjjjjjjjjjjjjjjjjfffffffffffffffffffffffftttt//|}?]-])//(
+/t////\\\\\||((((()))1111{{{}}}[[]]]?------__+++++++~+]\xnnnnnnnnnnnnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuvuuuuuuuuuuuuuuuuuvuuunnnxxrrjjjjjrrrrjjjjrjjjrrrrrrrrrrjjjjrrxrxrrrxxxxxxxxxxrrrrrrrrjjjjjjjjjjjjfffffffffffffftttttttttttttttttftt\{?_-?_](//1
+tttt////\\\|||(((()))11111{{}}}[[[[]]?-----__+++++++~~~?(rxxnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuuuuuunnnnxxrrjfffttt///\\/tttttttttfffffffffft/\\///tttfjjrrrrrrrrrrrrrrrrjjjjjjjjjjjjjjfffffffffffffftttttttttttttttt////(_l><~+?[[}}
+ttttt//////\\|||((()))))111{}}}}}[[]]]?----__+++_++++~~~-(fxxxxnnnnnnnnnnnnnnnnnnnnnxxxnnnnunnnnnuuuuuuuuuuuuuunxjjjjjfjjft/\|||(()))(\//\\\|\||\\///\|(1}[[[}{1)((((|/tfjjjjjjjjjjjjjjjjjjjjjjjjjjffffffffffffffftttt|(1}[]][1\//////)-<___[1{{{{
+fttttttt///\\\\|||((())))111{{{}}[[[]]?---___+++_++~~~<<>~{frxxxxxxxxxxxxxnnnnnnnnnnxxxxnnnnnnnnnnunnnnnxxxxrjjft/\\\\||(1{}}}}}}}}}}?__]}}}}111{{1)1[-~>iii!!ii~_?}{1(|\\ttfjjjjjjjjjjjfffffffffffffffffffffftfftt|}-+<>!I;,^`:>_?[1{?__+_]))((()
+jffffttt//////\\\|||(((())11{{{}}}[[]]?---___+++_+~~~<<>ii<]/rrxrrxxxxxxxxxxxxxxxxxxnnnnnnnnnnnnnnnnnxxrrjjffttt//\(1}?~iI:,,,"""""""^`''^,,I<_--_++>I,`. .'`^``^,l+[(\/tttffffjjjjjffffffffttttftttttfffftttt\[~><<<il;,` '",:!<<_}1(((((
+jjjfffttttt////\\\\|||((()))111{}}[[[]]]?---_+++++~~~<<>iiii-|jrjrrrrrrrrrxxxxxxxxxxxxxxxxnnnxnnnnnnxrrjjtt/\\|(1{]_!,' .''.'. ..'`:<[(/tttttffffffffttttttttttttttttttttttt(_>!!lI:` .''''"I<_[{)(((((
+rrjjjjffttttt////\\\||||(())111{{}}[[]]]?---___++~~~<<<>i!!!!+(tjjjrrrrrrrrrrrrrxxxxxxxxxxxxxxxxxrrrrjft/\||(1}]_i" .`:-)\///ttftfftttttttttttttttt/////////(-l``^^`. '",",:l<?}{1))))))
+rrrrrjjfffttttt///\\||||(((())11{}}[[[]]???--__+~~~~<>>ii!!!!!>{tjjjjrrrrrrrrrrrrrxrrrrrrrrrrrjjjfftt/\|))1{[-i;' . .,-(\\//tttttttttttt////////\\\\\\\\\(?: .. "i>i!!i+?}{{1111111
+xxrrrrrjjjffttt////\\\||||(())11{{}}[[]]]??--__++~~<<>>i!!!!lll<[tjfffffffffffffffffjjjjjjjjjfftt/||())1}[?+l` ...'l?(\\//tttt/////////\\\\\\\\|||||\()?i:````^:!+?[]<ii><-]{{{1111111
+xxxxrrrjjjfffttttt//\\|||||(())11{{}[[[]]]?--___+~<<>>i!!!lllIII!](ttttttttttttttttffffffffftt//\|)))1{[-~l" '. '~1\\\////\\\\\\\||||||||(((((((((((()111111111}+ll<~+?]]][[}}}}}}
+xxxxrrrrjjjjffttttt//\\\\||||()111{}}}[]]]?--__+++~<>ii!!!llII;;::-)///////tttttttttttttt////\|(()11}?<!;". l[)|||\\\\\\\|||||||||(((()))))))((()))1111{}-<;I<-][[[[[]?-----
+xxxxxxrrrjjjfttttttt///\\||||(()11{{}}[[]]??-__+++~<>ii!!!lIII;:,,,>}|\\\\\\\\//////////\\|||(()){]_i:"' .l-1)(|||((((|||||||(((((()))))))))))1111{[<l!>I,:<[[[}}{}[]----
+nnxxxxxxrrrjjfffftttt///\\\||(()111{{}[[]]]??--_++~>>ii!!!llI;;:,"",i[(|||||\\\\\\\\///\\|((((1}?<I^. :~[1))(((((((((((()))))11111111111{{{{{{?illI`^I-[}{{{{{}[]]]]
+nnxnxxxxxrrrjjjjjfttttt//\\\||(())1{{}}[[]]??--_+~~<ii!!!!ll;;;:,"^^^l-1(((||||||||||||||()11[_>I"' .l-}11))))))))))))))111111{{{{{{{{{{{}?>llI, ,-[}}}}}}}}}}[[[
+unnnxxxxxrrrrjjjjjfttttt//\\||||()1{{{}}[]]]?--_+~~<ii!lllII;;;:,,"^`':+})))))(||||((((()1{]+>I"' ;+[{1111111111111111{{{{{{{{{{}}}}?>!!i!!!!~[}}}}}}}}}}}[[[
+unnnnxxxxxrrrrrrjjfttttt//\\\|||()11{{{}[]]]?--_+~~<ii!lllII;;;:,,"^`''"<[11)))(())))()1{]+iI,` :<?}{{{{{{{{{{{{{{{{{}}}}}}}}}]_>l!>_-?--?][}[[[[}}}}}}[[[
+uununxxxxxxrrrrrjjfftttt///\\\||()11{{{}[]]]?--__+~<ii!lllII;;::,,"^`'. `!?{{{{{1111{1{[-~!,' .......'```^^`. "<?[[[}}}}{{{{}}{{}}}}}[}}}]>;,I!<_-?][[[[[[[[[[[[[[[[[[[
+uuuuunxxxxxxxrrrrjjffffttt//\\\|(()1{{{}}[[]??--_+~<ii!lllII;:::,,"^`'.. .:~[}}}{{{}}[-~>l". .`",:;IIIIlll!!!!lI;,,,,,,::;IIII:"` `>-][}}}}}}}[[[[[[[[[[[]->:^;>_-____--???]]]]]]]]]]]]]]]
+vuuuuunnnxxxxrrrrrjjfffttt//\\\||()11{{}}[[]]??-_+~<ii!lllII;:::,,"^`'.. "i-]]][[[?_<l:"^`^ '":Ilii><<~~~~++++~<>i>>>>><<<>>>>il;" `!-]][[[[[[[]]]?_+++~iII!!;l~]]]?-_______----??]]]]]]]]
+vvvvuuunnxxxxxxrrrjjffftttt/\\\\|(()111{}}[[]]?-_+~~>i!!lII;::,,,"""^'.... `!_---?-<l:,:;;"' `,;!i><~~+++_---?????????--_++~~<<>i!I:. .I~???]]]][]]_>;":l>~+--+!l>-?]?????--_++___---???????
+vvvvuuunnnnnnxxxrrjjffftttt/\\\\||())11{}}[[]]?-_+~~>i!!lI;;:,,,""""^`'... 'I+--_>lIIl!I,`. .. `,;!>><~~~+_-?]]]]]]]]]]]]?--_+++~<<>!l;` ,<+___~<i!ll!<+----???-~!;I~?]]]]]??--____-----?????
+ccvvvvuuunnxxxxxrrrjjjjffttt/\\\\|(())1{}}[[]]?-_+~<>i!!lI;;:,,"^^^^^^``'.. .:<+~!!!!!l;"^`' .`' .`,;l><~+++__-][[[[[[[[[[]]]]]???-_+~~<i!I" .,li><<<+_-???????????_>I;l<-???????---------------
+zcccvvvuunnnxxxxrrrjjjjfftttt///\\|(()1{}}[[[]?-_+~<>i!!lI;:,,,"^^^^^^^^^````^:>~<!!!!I;::,"^. '^` .`,;li<~+__--??]][[[[[[[[[[[[[[]]??-_+~<>il,' "l<~_-----??????????-_+--------------------------
+zzccvvvuuunnxxxxxxrrjjjfftttt///\\\|()11}}}[[]]?_+~<ii!!lI;:,,,"^^^^^^^"""",:I!><ill!!llllI,^' .``. '^,;Ili<~++++__-??]]]][[[[[[[[[[]]]?-__+~<i!;^ ^I!<~+___---------------------------------------
+zzcccvvvuuunnnnxxxrrjjjfftttt///\\\|()11{}}[[[]?-+~<>i!llI;::,,"""^^^^^",:;Il>~<ilI!iiii!lI::"^' .`` '^:Il!><+____--??][]]]][[[[}}[[[[[]?--_+~<iil,' ."I>~+++_____________________------------------
+zXzzcvvvvuuunnnnnxrrrjjjftttt///\\\|()11{}}[[[]?-+~<>i!lI;;::,,""^"^^^",::;l~__<!II!<<>>>i!I;:"^ .. .`,I!><~+-??][[[[[}}[[[[[[[[}}}}[[[[]]?-__~>i!;^ ."l<++++_________________________----------_--
+zzzzzccvvuuunnnxxxrrrrrjffffttt/\\\|()11{}}[[]]--+++~>i!lI;::,,,,,,,:;l!lli-]?+iI::!~-??-+>lI,"` .^:I!>~+_?][[[}}{{{{{{{{{}}}}{{{{{{{{}[[]]?_+<il,' "!<~~~++++++++++++++++++_____________----__-
+Xzzzzccvvuuunnnxxxrrrrrjffffttt///\|()11{}}[[]?-_+++~<>ii!llI;,,::Il!iii!i_??_>I,":>-[[[?+>lI,' '";l>~-??]}}}{{1)))(()))111111))))))11{{{}[]-_~>l" `I<~~~++++++++++++++++++++++______________-
+YXXXzccccvuunnnxxxrrrrrjjfffttt///\\()11{}}[[]?_+~~~~~<>ii!!!I:,:;!iiii>+--_+>I;:;i-}1{{]_<l"' .`,;!<+_-][}{1111)((||||||((|||||||(((()))1}[?_~i;' ^I<~~~~~~~~~~~~~~~~~++++++++++++______----
+YXXXXzzccvvuunnnxxrrrrrjjfffttt///\\()11{}}[[]-_+~<<>>>iii!l!!IIl><<<<+_?]?-_>l;;l+{)(1[->I:,"^' .'`",l>~-?[{)(||\\\\\\\\\|||((())111{[?_+<i;` ^l<~~<~~~~~~~~~~~~~~~~~+++++++++_____----
+YYXXXzzcccvuunnnxxxrrrrjjfffftt///\\|(11{}}[[]?_~<<>>ii!!lllllll!i<_??]]]-+~>I;!i>-)(}_ili<>l,' .''' '^^^`'. ^l~?{(||||||((((){[-~~<<<>!lI;;::"`. ^l<<~~~~~~~~~~~~~~~~~~~++++++____-------
+YYXXXXzcccvuuunnxxxrrrrjjffffttt//\\|()1{}[[]]-_+~<>iiiii!I;;Ill!!>+-?]]_~iI;",l><~--<<+_~i;"`'''`";;,' '^,:;;;Il!!lI:^`^"l<-]{1)((()){}]_<;^. `I><<<<<<<<<<<<<~~~~~~~+++++__---------
+YYXXXXzzccvuuuunxxxrrrrjjffffftt//\\|()1{}[]??-_+~~~<<<><>!IIIl!>+_?]?-~>illI,"Ili<-[[]]_!;,:;I;,"";;:' .`"IllIl<+?[{1))11{}[?_>I"^^""^^^""",:;;;:,". ^li><<<<<<<<<<<<~<~~~~~++++___--------
+UUYYXXzzzcvuuuunxxxrrrrjjffffftt//\\|()1{}[]]?-_+++~++~<<i!lll!!lI!>~>!llllll;:I>_})){?<ll!><<~>;,,II:` ",. +{]+i!l!<-[{1))11}]_>;:Il!l:' .`. :!i>>>>>>>>>>>><<<<<~~~~++___-------?
+JJUYXXzzzcvuuuunxxxrrrrjjffffftt//\\|()1{}[[]?--____+~~+~~<>i!!l;:;:,"",;lIII:,;>?}}-~~?{1{]___+iI:ll:` '`^""^'.^I+?<i!lI;I>_[}{11}?<;,;><i>+?; :i; "I!iiiiiiiiiiiiii>>><<~~~++__------??
+JJUYYXXzzzcvuuunxxxrrrrjjffffftt//\\|()1{}[[]?----???-+~~~~~<>>!I;III:",;I;:;:::Ii~+]1\fff\11{}?+!Iiil" '^:Ili>><+---_+~<<il:;l<-][{[_i;,I><>!!>>il:,,:I;,`.. . "I!i!i!!!!!!!!!!!!!i><<<~++_----????
+JJUUUXXXzzcvuuunxxxrrrrjjffffftt//\\|()1{}[[]?------??---_+<>>>ilIl!!lI;;;;;;:,,"I-{\jxxrj/())1}-<!><i:. '^:l><~+_--??-_+~>!I;::I>-]][_<l:,:li>><~+_--?--+~>!l;:"` .`' ^;!!!!!!llII;;;;;;;;Illi><+_--???]]]
+JJJUUYXXzzcvuuunxxxrrrrjjffffftt//\\|(11{}[[?--__++~~~~~++~>!!lllIIlI;,"^^^"""^``:+1/jnnxjf\()11}-<~<i;`. '^,li~+-?][[[[]?_~ilII;;I>_]]]_<!;::;Ii>++_?][[]]?-+<i!l;^ '^",,` '^:Il!!!!lI;:,"^^````'```"I>_--?????]
+CJJJUYXXzzcvuuunxxxrrrrjjffffftt//\\()11}[[]?-_++~<>ii!!!!!lI;:,,"^^``'....'``'''"<1/rnnnxf/|(()1[??+iI,^. .`,Ii<_-?[}}}}]??_~>lllII!+][[[-<iI;IIli<+-]}{111{}[?_~>il" '````.'.`,"'..':!>~>I,",^ 'i+-??????
+CCJJUYXXzzcvuuunxxxrrrrjjffffftt//\\()1{}[[]?-__+~<i!lIII;;::,^^`'''. .. .">?)rnnnxf/\\\()1{}?+>I:. .'":li<+-?[[[[[]??_~>!!ll!>-[}}[-~!I;Ili~_-][{111111{[?_~>l" ."l, .l?]_I . I<_-?----
+CCJUUYYXXzzvuuunxxxxrrjjjfffftt///\|(11{}[[]?___+~>i!lI;;::,""^``'... ^ll>1jxxxt)(tt/|()){?_>:. '`":Ii<+_???]]][[]?_<ii!l!<?[}}}?~iIIli<_][}}{{{{{{}}[?_~il" .`. "!il" ',IIIl!i>
+CCCJUYYXXzzvuuunxxxxrrjjjfffftt///\|(11{}[[]?___+~>i!lI;;:,,"^^``'''....... .`^.^~)fff(-?\t///\(){?>:'..'^",I!>~~+_-][}{{{}]+>!l!>_[}{{}?+iI;I>~?[{1{}}}}}[]]?_+<!;` '"^ ';I;" "III!i>>
+LCJJUYYXXzzvuuunxxxxrrjjjfffftttt/\|()1{}[[]?_+~~>i!lI;:::,""^`''''.....''. .'' l[(||)--)\///\||)]<:'..'`^";l!ii<+-]}{{1)1[+iI!<_?[{{{{[-<!::l~]}11{{{{}[[]?_+<iI". '`' 'I!l;. :!!i><~~
+LCJJUYYXXzzvuuunxxxxrrjjjfffftt//\||)1{}}[]?-++<<i!llI;:::,""^`''''....''' .' "!+_--__])//t//\|[<;`''``^,;I!ii>~_][{{1)1]<li+-]][{}}}[]_>l,,>?{111{{}[]?-+~<iI,' .'''. ,+??-I 'i?]?????
+LCJJJYYXXzzvuuunxxxxrrrjjjffftt//\|()1{}[]]?_+~<>i!lII;:::,"^`'''.....''`' ^,;>-]+<~?1/tt//|]>;"^`^^,:li>~~++-][{11){_~+]}{}}{1111{}]+>I:!_{11){{}]?-+~<iI:` ``' '>[{{1-: `:-11{{{{{
+QLCJJYYXXzzvuuunxxxxrrrjjjtttt///\|(){{[[]??_+~<>i!lII:::,""^`'''....'```' .``',>?]+>~-1/ft/\1+l:,"^",;l!><<~+_-?[}{{{}???[}}{1(\/|){}]_<il~]{)1){}[?-_~<iI:^. .`' :_1)1)[+: ^i?)|\\\\\
+QLCJJYYYXzzvuuunxxrrrjjjjfttt///\\|(1{}[[]??_+~<>i!lI;:::,"^^`'''....`""^' `:,`.':<?[+<+[)\\|\)?>:,,"",:l!i<~~~++_?][}}}}[?____-[{(){[-~<<<><-[{)11{}]-_+<iI,^. `' :+)(((1?i". ^l?)|\\\\\
+LLCJUUYYXzzvuuunxxrrrjjfftttt///\|()1{}[]]?-+~<>>!!lI;:,,,"^^`''.....^"^' 'l>I,`'"i?]_ii-{(||()}+l"`^''^,I!!>~~+++_-?][[[[[?_+++-?][[]?+~<<<~-][}}}{}}]-+~>l:^' '^. ,+(\\/\{<:' `l-1|\\\\\
+LLCJUYYXXzzvuuuxxrrrrjjffttt////\()11{}[]?-_+~<>>!!lI;:,""^^``''.....'^.. ,i~<l:^`:+11?~<?1(((){->I^. `:l!>~~++_--?]]][[[]??][}{{{{}}}}]??]][[[}}}}}]-+~iI,` .`` ^<)|///1<;` .;~}(\||||
+LLJJUYXXzzcuuunxxxrrjjffffttt//\|()1{}[]]?-_~~<>i!lI;;:,""^```''..... 'l>i+-<;^^l}/|?_-?{))(1?>l;^ `Ii>~++++_-??][[[[[}}{1)))(((()1{}}[[[[[}}}}}]-+~iI". .. ^<{(\\\1<;` ^i-1|||||
+LLJJUYXXzcvuuunxxxrjjjfffttt//\\|)1{{}[]]?_+~<>i!llI;:,,"^^```'.. ':~~!-[+!I;l+{){{1}{11{[>l;,' ^!>~+++___--?]][[[}}{11))1)))1{{{}}[[[][][]]]-+~!:^ '!}(\\\1~I` 'I+}(((((
+CCJUUYXXzcvuunxxxrrjjffttttt/\\\|)1{}[[]?-_+~<>i!llI;,"""^```''. ,i~>l]}_>i!ll_)\\|1}?__~l;,". `I>++__________+_-?][[[[[}}}[]????-????]??]]?+<l:` .'l])|||1_!". .,>[)))))
+CCJUUYXXzcvunxxrrrjjjffttt//\\\|()1{}[]??-+~<>i!lII;:,"^^^``'''. 'I~~>!]}_<~_+~{/t|{[_~<iI,^`' ,!~++__+~>;"^''`^,;li<~~~<<>i!I:,,,,;!<+--_~i;". 'I?1())1?i"' ^!?{11{1
+CCJUUYXXzcvunxxrrrjjjffttt//\\\|(1{{}]]??-+~<ii!lI;::,""^^``''.. ',l+]?+<><~<<>i<1\|[_~>l,",,` "!~+___+~>l:^. .";Illl:^. ^:!iii!I"' "-{11{]i"' ';~]{11{
+CCJUYXXzcvuunxrrrjjfffttt//\\\|(){{}[]?--_+<>i!llI;,""^^^^`'''.. `>__-?+i:";><l,l~?-_<i!l,.. "l<+__+~~~>l:""^````''....''```":l><~~~>l,' I-1{]i". ,>?}{{}
+JJUYYXzzvuunxxrrrjjfftttt//\\|()1{}[[]?-_+~>i!!lI;:,""^^^``'.... ,i+_~!ll;^ '":;:I!!!!I,^. ;<++++++~<iI;:;IllllI;;;::::;!>~~++++~>I" '<[]>^. "i]{111
+JJUYXzzcvuuxxrrjjfftttt///\\\|()1}}[[?-_++<i!lIII;:,""^````'......^!__~!,' .'`^",:,"",,` ,<++____+~<i!lllIIIIIIIIII!i<~+~~~~~<!:' :_<" ^!?)|||
+JJUYXzcvuunxrrjjffftttt//\\\|()1{}[[]-__~~>i!lIII:,,"^^````'...':~[?!' .'`^^``^` ^i++___--?--__++~~<<<<~~__-_++~~~~<i:' '` 'I_)\\\
+UUYXXzcvunxxrrjjfftttt//\\\||(1{}[[]?-_+~<>i!lII;:,"^^^````'.."<-_: ..'``` `l<+_--?]]]]?????------?---_+~<<<!:`. ;+1|\\
+UUYXzccvunxxrjffffttt///\\||(){{}[[]?__~<<>i!lI;;::"^^^````'^!_!. .`^` 'Ii<_--?????]]]]]]?????-___+<>iI,`.. . ,~}|//
+UYXzcvvunxxrjfffttt///\\\\|()1{}[[]]-_+~<>i!lI;;::,"^^^```^!-_I ";` .. ";l>+_-_????????]????-___+~i;"`'''. ^<](//
+YYXzvvunnxrjjfftttt//\/\|||()1{[[]?--_+<>>i!II;::,,"^^^^,!~+I. "I. .. ^,;I!i<~~~~++++++++++~~<>!I:^''''`. 'l-)//
+XXzcvunxxrjjfftt////\\\||())1{}[]]?-_+~<>>!lII;:,,,"^";!il' .' .^",:::;IIIIl!iiiii!!!lIII;:"^`''' .I-(jn
+Xzcuunxxrrjfftt////\\|||()1{}[[]]?--_+<<>i!lI;::,,,":!>: `^"",,,,;Ili><~__-_+++~<il:,^``'' ,_\vJ
+zcvunxxrrjffftt////\\||((1{{}[]]?-__+<<>!!lII;:::::I;' '^,,,"",:Il!><+-?]]??_+>l;,^``'. `~(nY
+zcunxxrjjfftt///\\\\|||()1{}[[]?--_+~<>i!lllI;::;l;` `","""",;I;;;l!<_--+i;:,"^```'. ;]tv
+vuunxrrjjfft//\\\\|||())1{}[[]]?-_+~~<ii!lllIII><i, ^"""""",:;;:,,;!i!I,""""^^``' `+|x
+unxxrjjfftt/\\\\||||())1{}}[]]??-_+~<>iii!lIIIl+-; '``^^`^",:;:,""""^"",,^`''. . ,_(
+nxxrjjffttt/\\|||||()11{}[]]]]?-__+~~<>ii~?]-~~+!` .``^^^^",::::::::;:,"'. 'i}
+xxrjffttt//\\||||())1{}}[]]]???-_+~~~~+[/fjf\}!. '`^^^`'``^"""""`. l]
+xrjjff///\\\||(|(()11{}[]]]]?--_+~~~~]/xxf\[i' .'``'. ,_
+jffftt/\\\|||((())1{{}]]??--__++~<<<]tnuj1<. .''. ^<
diff --git a/sysroot/etc/motd b/sysroot/etc/motd
new file mode 100644
index 0000000..f252b8e
--- /dev/null
+++ b/sysroot/etc/motd
@@ -0,0 +1 @@
+why the hell are you using this os?
diff --git a/sysroot/etc/profile b/sysroot/etc/profile
new file mode 100644
index 0000000..7cd7a19
--- /dev/null
+++ b/sysroot/etc/profile
@@ -0,0 +1,8 @@
+# acts like .bash_profile or .zsh_profile
+
+const motd_size = fs:size("/etc/motd")
+if motd_size > 0 do
+ puts("\n")
+ puts(fs:read_bytes("/etc/motd", 0, motd_size))
+ puts("\n")
+end
diff --git a/sysroot/usr/include/fcntl.h b/sysroot/usr/include/fcntl.h
new file mode 100644
index 0000000..4c9dc07
--- /dev/null
+++ b/sysroot/usr/include/fcntl.h
@@ -0,0 +1,12 @@
+#ifndef _FCNTL_H
+#define _FCNTL_H
+
+#define O_RDONLY 0
+#define O_WRONLY 1
+#define O_CREAT 0x40
+#define O_TRUNC 0x200
+#define O_APPEND 0x400
+
+int open(const char* path, int flags);
+
+#endif
diff --git a/sysroot/usr/include/stddef.h b/sysroot/usr/include/stddef.h
new file mode 100644
index 0000000..0fe5f56
--- /dev/null
+++ b/sysroot/usr/include/stddef.h
@@ -0,0 +1,9 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+typedef unsigned long size_t;
+typedef long ptrdiff_t;
+
+#define NULL ((void*)0)
+
+#endif
diff --git a/sysroot/usr/include/stdint.h b/sysroot/usr/include/stdint.h
new file mode 100644
index 0000000..d3da3d2
--- /dev/null
+++ b/sysroot/usr/include/stdint.h
@@ -0,0 +1,10 @@
+#ifndef _STDINT_H
+#define _STDINT_H
+
+typedef unsigned char uint8_t; typedef signed char int8_t;
+typedef unsigned short uint16_t; typedef short int16_t;
+typedef unsigned int uint32_t; typedef int int32_t;
+typedef unsigned long uint64_t; typedef long int64_t;
+typedef unsigned long uintptr_t; typedef long intptr_t;
+
+#endif
diff --git a/sysroot/usr/include/stdio.h b/sysroot/usr/include/stdio.h
new file mode 100644
index 0000000..9f6929e
--- /dev/null
+++ b/sysroot/usr/include/stdio.h
@@ -0,0 +1,15 @@
+#ifndef _STDIO_H
+#define _STDIO_H
+
+#define EOF (-1)
+
+int putchar(int character);
+int getchar(void);
+int puts(const char* string);
+int printf(const char* format, ...);
+
+// revel only, not part of stdc
+// read a line from stdin -> returns length
+int readline(char* buffer, int max_length);
+
+#endif
diff --git a/sysroot/usr/include/stdlib.h b/sysroot/usr/include/stdlib.h
new file mode 100644
index 0000000..7950258
--- /dev/null
+++ b/sysroot/usr/include/stdlib.h
@@ -0,0 +1,17 @@
+#ifndef _STDLIB_H
+#define _STDLIB_H
+
+#include <stddef.h>
+
+void* malloc(size_t length);
+void free(void* pointer);
+void* calloc(size_t count, size_t size);
+void* realloc(void* pointer, size_t length);
+
+void exit(int code) __attribute__((noreturn));
+
+int atoi(const char* string);
+long atol(const char* string);
+int abs(int value);
+
+#endif
diff --git a/sysroot/usr/include/string.h b/sysroot/usr/include/string.h
new file mode 100644
index 0000000..2177ad6
--- /dev/null
+++ b/sysroot/usr/include/string.h
@@ -0,0 +1,17 @@
+#ifndef _STRING_H
+#define _STRING_H
+
+#include <stddef.h>
+
+size_t strlen(const char* string);
+int strcmp(const char* a, const char* b);
+int strncmp(const char* a, const char* b, size_t length);
+char* strcpy(char* destination, const char* source);
+char* strncpy(char* destination, const char* source, size_t length);
+
+void* memcpy(void* destination, const void* source, size_t length);
+void* memmove(void* destination, const void* source, size_t length);
+void* memset(void* destination, int value, size_t length);
+int memcmp(const void* a, const void* b, size_t length);
+
+#endif
diff --git a/sysroot/usr/include/sys/syscall.h b/sysroot/usr/include/sys/syscall.h
new file mode 100644
index 0000000..4a23a53
--- /dev/null
+++ b/sysroot/usr/include/sys/syscall.h
@@ -0,0 +1,34 @@
+#ifndef _SYS_SYSCALL_H
+#define _SYS_SYSCALL_H
+
+#define SYS_exit 0
+#define SYS_write 1
+#define SYS_read 2
+#define SYS_open 7
+#define SYS_close 8
+#define SYS_lseek 9
+#define SYS_brk 10
+#define SYS_sbrk 11
+
+static inline long __syscall1(long number, long a1)
+{
+ long result;
+ __asm__ volatile("int $0x80" : "=a"(result) : "a"(number), "D"(a1) : "memory");
+ return result;
+}
+
+static inline long __syscall2(long number, long a1, long a2)
+{
+ long result;
+ __asm__ volatile("int $0x80" : "=a"(result) : "a"(number), "D"(a1), "S"(a2) : "memory");
+ return result;
+}
+
+static inline long __syscall3(long number, long a1, long a2, long a3)
+{
+ long result;
+ __asm__ volatile("int $0x80" : "=a"(result) : "a"(number), "D"(a1), "S"(a2), "d"(a3) : "memory");
+ return result;
+}
+
+#endif
diff --git a/sysroot/usr/include/unistd.h b/sysroot/usr/include/unistd.h
new file mode 100644
index 0000000..f5a67ab
--- /dev/null
+++ b/sysroot/usr/include/unistd.h
@@ -0,0 +1,18 @@
+#ifndef _UNISTD_H
+#define _UNISTD_H
+
+#include <stddef.h>
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+long read(int fd, void* buffer, size_t length);
+long write(int fd, const void* buffer, size_t length);
+int close(int fd);
+long lseek(int fd, long offset, int whence);
+
+void* sbrk(long increment);
+int brk(void* address);
+
+#endif
diff --git a/sysroot/usr/lib/libc/crt0.c b/sysroot/usr/lib/libc/crt0.c
new file mode 100644
index 0000000..16c3a94
--- /dev/null
+++ b/sysroot/usr/lib/libc/crt0.c
@@ -0,0 +1,28 @@
+#include <stdlib.h>
+
+extern int main(int argc, char** argv);
+
+void _start(const char* arg, unsigned long arglen)
+{
+ static char arg_buffer[256];
+ char* argv[3];
+ int argc = 1;
+ argv[0] = "";
+
+ if (arglen > 0)
+ {
+ unsigned long count = arglen;
+ if (count > sizeof(arg_buffer) - 1)
+ count = sizeof(arg_buffer) - 1;
+ for (unsigned long i = 0; i < count; i++)
+ arg_buffer[i] = arg[i];
+ arg_buffer[count] = 0;
+ argv[1] = arg_buffer;
+ argc = 2;
+ }
+ else
+ argv[1] = NULL;
+
+ argv[argc] = NULL;
+ exit(main(argc, argv));
+}
diff --git a/sysroot/usr/lib/libc/stdio.c b/sysroot/usr/lib/libc/stdio.c
new file mode 100644
index 0000000..d0e7ad7
--- /dev/null
+++ b/sysroot/usr/lib/libc/stdio.c
@@ -0,0 +1,211 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdarg.h>
+
+int putchar(int character)
+{
+ char byte = (char)character;
+ if (write(1, &byte, 1) != 1)
+ return EOF;
+ return (unsigned char)byte;
+}
+
+int getchar(void)
+{
+ char byte;
+ if (read(0, &byte, 1) <= 0)
+ return EOF;
+ return (unsigned char)byte;
+}
+
+int puts(const char* string)
+{
+ (void)write(1, string, strlen(string));
+ (void)write(1, "\n", 1);
+ return 0;
+}
+
+static int format_unsigned(char* buffer, unsigned long value, int base, int upper)
+{
+ const char* digits = upper ? "0123456789ABCDEF" : "0123456789abcdef";
+ char temp[32];
+ int count = 0;
+ if (value == 0)
+ temp[count++] = '0';
+ while (value > 0)
+ {
+ temp[count++] = digits[value % (unsigned)base];
+ value /= (unsigned)base;
+ }
+ for (int i = 0; i < count; i++)
+ buffer[i] = temp[count - 1 - i];
+ return count;
+}
+
+static int format_signed(char* buffer, long value)
+{
+ int negative = value < 0;
+ unsigned long magnitude = negative ? (unsigned long)(-value) : (unsigned long)value;
+ int count = 0;
+ if (negative)
+ buffer[count++] = '-';
+ return count + format_unsigned(buffer + count, magnitude, 10, 0);
+}
+
+#define PRINTF_BUFFER 256
+
+// yoinked straight off open source
+int printf(const char* format, ...)
+{
+ char out[PRINTF_BUFFER];
+ int filled = 0;
+ int total = 0;
+ va_list args;
+ va_start(args, format);
+
+#define FLUSH() \
+ do { \
+ if (filled > 0) \
+ { \
+ (void)write(1, out, filled); \
+ filled = 0; \
+ } \
+ } while (0)
+#define EMIT(ch) \
+ do { \
+ if (filled == PRINTF_BUFFER) \
+ FLUSH(); \
+ out[filled++] = (char)(ch); \
+ total++; \
+ } while (0)
+
+ for (const char* cursor = format; *cursor; cursor++)
+ {
+ if (*cursor != '%')
+ {
+ EMIT(*cursor);
+ continue;
+ }
+
+ cursor++;
+ if (*cursor == '%')
+ {
+ EMIT('%');
+ continue;
+ }
+
+ int zero_pad = 0;
+ if (*cursor == '0')
+ {
+ zero_pad = 1;
+ cursor++;
+ }
+ int width = 0;
+ while (*cursor >= '0' && *cursor <= '9')
+ {
+ width = width * 10 + (*cursor - '0');
+ cursor++;
+ }
+ int is_long = 0;
+ while (*cursor == 'l')
+ {
+ is_long = 1;
+ cursor++;
+ }
+
+ char conversion = *cursor;
+ if (conversion == 's')
+ {
+ const char* string = va_arg(args, const char*);
+ if (!string)
+ string = "(null)";
+ int length = (int)strlen(string);
+ for (int i = length; i < width; i++)
+ EMIT(' ');
+ for (int i = 0; i < length; i++)
+ EMIT(string[i]);
+ continue;
+ }
+ if (conversion == 'c')
+ {
+ int character = va_arg(args, int);
+ for (int i = 1; i < width; i++)
+ EMIT(' ');
+ EMIT(character);
+ continue;
+ }
+
+ char number[34];
+ int length = 0;
+ if (conversion == 'd' || conversion == 'i')
+ {
+ long value = is_long ? va_arg(args, long) : (long)va_arg(args, int);
+ length = format_signed(number, value);
+ }
+ else if (conversion == 'u')
+ {
+ unsigned long value = is_long ? va_arg(args, unsigned long) : (unsigned long)va_arg(args, unsigned int);
+ length = format_unsigned(number, value, 10, 0);
+ }
+ else if (conversion == 'x' || conversion == 'X')
+ {
+ unsigned long value = is_long ? va_arg(args, unsigned long) : (unsigned long)va_arg(args, unsigned int);
+ length = format_unsigned(number, value, 16, conversion == 'X');
+ }
+ else if (conversion == 'p')
+ {
+ unsigned long value = (unsigned long)va_arg(args, void*);
+ EMIT('0');
+ EMIT('x');
+ length = format_unsigned(number, value, 16, 0);
+ }
+ else
+ {
+ EMIT('%');
+ EMIT(conversion);
+ continue;
+ }
+
+ for (int i = length; i < width; i++)
+ EMIT(zero_pad ? '0' : ' ');
+ for (int i = 0; i < length; i++)
+ EMIT(number[i]);
+ }
+
+ FLUSH();
+ va_end(args);
+ return total;
+
+#undef EMIT
+#undef FLUSH
+}
+
+int readline(char* buffer, int max_length)
+{
+ int length = 0;
+ for (;;)
+ {
+ char character;
+ if (read(0, &character, 1) <= 0)
+ break;
+ if (character == '\n')
+ break;
+ if (character == '\b')
+ {
+ if (length > 0)
+ {
+ length--;
+ (void)write(1, "\b \b", 3);
+ }
+ continue;
+ }
+ if (length < max_length - 1)
+ {
+ buffer[length++] = character;
+ (void)write(1, &character, 1);
+ }
+ }
+ buffer[length] = 0;
+ return length;
+}
diff --git a/sysroot/usr/lib/libc/stdlib.c b/sysroot/usr/lib/libc/stdlib.c
new file mode 100644
index 0000000..a0a86b9
--- /dev/null
+++ b/sysroot/usr/lib/libc/stdlib.c
@@ -0,0 +1,185 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+
+#define HEAP_HEADER 16UL
+#define HEAP_ALIGN 16UL
+#define HEAP_MIN 32UL
+#define HEAP_CHUNK (64UL * 1024UL)
+
+static unsigned long heap_start = 0;
+static unsigned long heap_end = 0;
+static unsigned long heap_rover = 0;
+
+static unsigned long heap_block_size(unsigned long block)
+{
+ return *(unsigned long*)block & ~15UL;
+}
+
+static int heap_block_used(unsigned long block)
+{
+ return (int)(*(unsigned long*)block & 1UL);
+}
+
+static void heap_set(unsigned long block, unsigned long size, int used)
+{
+ *(unsigned long*)block = size | (used ? 1UL : 0UL);
+}
+
+static unsigned long heap_align(unsigned long value)
+{
+ return (value + HEAP_ALIGN - 1UL) & ~(HEAP_ALIGN - 1UL);
+}
+
+// pull another hunk off sbrk and drop a free block over it
+static int heap_grow(unsigned long need)
+{
+ unsigned long want = heap_align(need);
+ if (want < HEAP_CHUNK)
+ want = HEAP_CHUNK;
+ unsigned long got = (unsigned long)sbrk((long)want);
+ if ((long)got < 0)
+ return 0;
+ if (heap_start == 0)
+ {
+ heap_start = got;
+ heap_end = got;
+ heap_rover = got;
+ }
+ heap_set(heap_end, want, 0);
+ heap_end += want;
+ return 1;
+}
+
+// fire O(n) malloc implementation frfr
+void* malloc(size_t length)
+{
+ if (length == 0)
+ return NULL;
+ unsigned long need = heap_align(HEAP_HEADER + length);
+ if (need < HEAP_MIN)
+ need = HEAP_MIN;
+
+ for (;;)
+ {
+ if (heap_rover < heap_start || heap_rover >= heap_end)
+ heap_rover = heap_start;
+ unsigned long block = heap_rover;
+ unsigned long limit = heap_end;
+ for (int pass = 0; pass < 2; pass++)
+ {
+ while (block < limit)
+ {
+ if (!heap_block_used(block))
+ {
+ // lazily coalesce the free run starting here
+ unsigned long size = heap_block_size(block);
+ while (block + size < heap_end && !heap_block_used(block + size))
+ size += heap_block_size(block + size);
+ heap_set(block, size, 0);
+ if (size >= need)
+ {
+ if (size >= need + HEAP_MIN)
+ {
+ heap_set(block, need, 1);
+ heap_set(block + need, size - need, 0);
+ heap_rover = block + need;
+ }
+ else
+ {
+ heap_set(block, size, 1);
+ heap_rover = block + size;
+ }
+ if (heap_rover >= heap_end)
+ heap_rover = heap_start;
+ return (void*)(block + HEAP_HEADER);
+ }
+ }
+ block += heap_block_size(block);
+ }
+ block = heap_start;
+ limit = heap_rover;
+ }
+ if (!heap_grow(need))
+ return NULL;
+ }
+}
+
+void free(void* pointer)
+{
+ if (pointer == NULL)
+ return;
+ unsigned long block = (unsigned long)pointer - HEAP_HEADER;
+ heap_set(block, heap_block_size(block), 0);
+}
+
+void* calloc(size_t count, size_t size)
+{
+ unsigned long total = (unsigned long)count * (unsigned long)size;
+ unsigned char* bytes = malloc(total);
+ if (bytes)
+ for (unsigned long i = 0; i < total; i++)
+ bytes[i] = 0;
+ return bytes;
+}
+
+void* realloc(void* pointer, size_t length)
+{
+ if (pointer == NULL)
+ return malloc(length);
+ if (length == 0)
+ {
+ free(pointer);
+ return NULL;
+ }
+ unsigned long block = (unsigned long)pointer - HEAP_HEADER;
+ unsigned long have = heap_block_size(block) - HEAP_HEADER;
+ if (length <= have)
+ return pointer;
+ unsigned char* grown = malloc(length);
+ if (!grown)
+ return NULL;
+ unsigned char* source = pointer;
+ for (unsigned long i = 0; i < have; i++)
+ grown[i] = source[i];
+ free(pointer);
+ return grown;
+}
+
+void exit(int code)
+{
+ __syscall1(SYS_exit, code);
+ for (;;)
+ ;
+}
+
+long atol(const char* string)
+{
+ while (*string == ' ' || *string == '\t')
+ string++;
+ int negative = 0;
+ if (*string == '-')
+ {
+ negative = 1;
+ string++;
+ }
+ else if (*string == '+')
+ string++;
+ long value = 0;
+ while (*string >= '0' && *string <= '9')
+ {
+ value = value * 10 + (*string - '0');
+ string++;
+ }
+ return negative ? -value : value;
+}
+
+int atoi(const char* string)
+{
+ return (int)atol(string);
+}
+
+int abs(int value)
+{
+ return value < 0 ? -value : value;
+}
diff --git a/sysroot/usr/lib/libc/string.c b/sysroot/usr/lib/libc/string.c
new file mode 100644
index 0000000..7bbc0c2
--- /dev/null
+++ b/sysroot/usr/lib/libc/string.c
@@ -0,0 +1,92 @@
+#include <string.h>
+
+size_t strlen(const char* string)
+{
+ size_t length = 0;
+ while (string[length])
+ length++;
+ return length;
+}
+
+int strcmp(const char* a, const char* b)
+{
+ while (*a && *a == *b)
+ {
+ a++;
+ b++;
+ }
+
+ return (int)(unsigned char)*a - (int)(unsigned char)*b;
+}
+
+int strncmp(const char* a, const char* b, size_t length)
+{
+ for (size_t i = 0; i < length; i++)
+ {
+ unsigned char ca = (unsigned char)a[i];
+ unsigned char cb = (unsigned char)b[i];
+ if (ca != cb)
+ return (int)ca - (int)cb;
+ if (ca == 0)
+ return 0;
+ }
+ return 0;
+}
+
+char* strcpy(char* destination, const char* source)
+{
+ char* out = destination;
+ while ((*out++ = *source++))
+ ;
+ return destination;
+}
+
+char* strncpy(char* destination, const char* source, size_t length)
+{
+ size_t i = 0;
+ for (; i < length && source[i]; i++)
+ destination[i] = source[i];
+ for (; i < length; i++)
+ destination[i] = 0;
+ return destination;
+}
+
+void* memcpy(void* destination, const void* source, size_t length)
+{
+ unsigned char* out = destination;
+ const unsigned char* in = source;
+ for (size_t i = 0; i < length; i++)
+ out[i] = in[i];
+ return destination;
+}
+
+void* memmove(void* destination, const void* source, size_t length)
+{
+ unsigned char* out = destination;
+ const unsigned char* in = source;
+ if (out < in)
+ for (size_t i = 0; i < length; i++)
+ out[i] = in[i];
+ else
+ for (size_t i = length; i > 0; i--)
+ out[i - 1] = in[i - 1];
+ return destination;
+}
+
+void* memset(void* destination, int value, size_t length)
+{
+ unsigned char* out = destination;
+ for (size_t i = 0; i < length; i++)
+ out[i] = (unsigned char)value;
+ return destination;
+}
+
+int memcmp(const void* a, const void* b, size_t length)
+{
+ const unsigned char* aa = a;
+ const unsigned char* bb = b;
+ for (size_t i = 0; i < length; i++)
+ if (aa[i] != bb[i])
+ return (int)aa[i] - (int)bb[i];
+ return 0;
+}
diff --git a/sysroot/usr/lib/libc/syscalls.c b/sysroot/usr/lib/libc/syscalls.c
new file mode 100644
index 0000000..ad959b9
--- /dev/null
+++ b/sysroot/usr/lib/libc/syscalls.c
@@ -0,0 +1,38 @@
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/syscall.h>
+
+long read(int fd, void* buffer, size_t length)
+{
+ return __syscall3(SYS_read, fd, (long)buffer, (long)length);
+}
+
+long write(int fd, const void* buffer, size_t length)
+{
+ return __syscall3(SYS_write, fd, (long)buffer, (long)length);
+}
+
+int open(const char* path, int flags)
+{
+ return (int)__syscall2(SYS_open, (long)path, flags);
+}
+
+int close(int fd)
+{
+ return (int)__syscall1(SYS_close, fd);
+}
+
+long lseek(int fd, long offset, int whence)
+{
+ return __syscall3(SYS_lseek, fd, offset, whence);
+}
+
+void* sbrk(long increment)
+{
+ return (void*)__syscall1(SYS_sbrk, increment);
+}
+
+int brk(void* address)
+{
+ return (int)__syscall1(SYS_brk, (long)address);
+}
diff --git a/sysroot/usr/share/acorn8.psf b/sysroot/usr/share/acorn8.psf
new file mode 100644
index 0000000..57bc46b
--- /dev/null
+++ b/sysroot/usr/share/acorn8.psf
Binary files differ
diff --git a/sysroot/usr/share/dejavu.ttf b/sysroot/usr/share/dejavu.ttf
new file mode 100644
index 0000000..597b2e0
--- /dev/null
+++ b/sysroot/usr/share/dejavu.ttf
Binary files differ
diff --git a/sysroot/usr/share/pearl8.psf b/sysroot/usr/share/pearl8.psf
new file mode 100644
index 0000000..acf7939
--- /dev/null
+++ b/sysroot/usr/share/pearl8.psf
Binary files differ
diff --git a/sysroot/usr/share/sun16.psf b/sysroot/usr/share/sun16.psf
new file mode 100644
index 0000000..8042ba3
--- /dev/null
+++ b/sysroot/usr/share/sun16.psf
Binary files differ
diff --git a/sysroot/usr/share/terminess.ttf b/sysroot/usr/share/terminess.ttf
new file mode 100644
index 0000000..0055a2c
--- /dev/null
+++ b/sysroot/usr/share/terminess.ttf
Binary files differ
diff --git a/sysroot/usr/share/vga16.psf b/sysroot/usr/share/vga16.psf
new file mode 100644
index 0000000..652b07b
--- /dev/null
+++ b/sysroot/usr/share/vga16.psf
Binary files differ
diff --git a/sysroot/usr/share/vga8.psf b/sysroot/usr/share/vga8.psf
new file mode 100644
index 0000000..3fcce09
--- /dev/null
+++ b/sysroot/usr/share/vga8.psf
Binary files differ