parent
4d5c055488
commit
5dfdd8e237
|
@ -0,0 +1,130 @@
|
|||
#!/bin/bash
|
||||
# Copyright (C) 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
||||
# This file is part of Gnu Mes
|
||||
#
|
||||
# Gnu Mes is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Gnu Mes is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Gnu Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Usage:
|
||||
# kaem --verbose --strict
|
||||
# bin/mes-m2 --boot scaffold/boot/14-exit.scm
|
||||
# bin/mes-m2 --boot scaffold/boot/15-display.scm
|
||||
|
||||
M2-Planet \
|
||||
--debug \
|
||||
--architecture x86 \
|
||||
-f lib/linux/x86-mes-m2/crt1.c \
|
||||
-f lib/linux/x86-mes-m2/mini.c \
|
||||
-f lib/m2/exit.c \
|
||||
-f lib/m2/write.c \
|
||||
-f lib/linux/x86-mes-m2/syscall.c \
|
||||
-f include/linux/x86/syscall.h \
|
||||
-f lib/m2/brk.c \
|
||||
-f lib/m2/malloc.c \
|
||||
-f lib/m2/memset.c \
|
||||
-f lib/m2/read.c \
|
||||
-f lib/m2/fdgetc.c \
|
||||
-f lib/stdio/getchar.c \
|
||||
-f lib/m2/putchar.c \
|
||||
-f lib/m2/open.c \
|
||||
-f lib/m2/mes_open.c \
|
||||
-f lib/m2/strlen.c \
|
||||
-f lib/m2/eputs.c \
|
||||
-f lib/m2/fdputc.c \
|
||||
-f lib/mes/eputc.c \
|
||||
\
|
||||
-f include/mes/mes.h.m2 \
|
||||
-f include/mes/m2.h.m2 \
|
||||
-f include/mes/builtins.h.m2 \
|
||||
-f include/mes/constants.h.m2 \
|
||||
-f include/mes/symbols.h.m2 \
|
||||
\
|
||||
-f lib/mes/__assert_fail.c \
|
||||
-f lib/mes/assert_msg.c \
|
||||
\
|
||||
-f lib/m2/fdputc.c \
|
||||
-f lib/m2/strncmp.c \
|
||||
-f lib/m2/getenv.c \
|
||||
-f lib/mes/fdputs.c.m2 \
|
||||
-f lib/m2/ntoab.c \
|
||||
-f lib/ctype/isdigit.c.m2 \
|
||||
-f lib/ctype/isxdigit.c.m2 \
|
||||
-f lib/ctype/isspace.c.m2 \
|
||||
-f lib/ctype/isnumber.c.m2 \
|
||||
-f lib/m2/abtol.c \
|
||||
-f lib/m2/atoi.c \
|
||||
-f lib/m2/memcpy.c \
|
||||
-f lib/stdlib/free.c \
|
||||
-f lib/stdlib/realloc.c.m2 \
|
||||
-f lib/m2/strcpy.c \
|
||||
-f lib/mes/itoa.c.m2 \
|
||||
-f lib/mes/fdungetc.c.m2 \
|
||||
-f lib/m2/setenv.c \
|
||||
-f lib/m2/access.c \
|
||||
-f lib/m2/chmod.c \
|
||||
-f lib/m2/isatty.c \
|
||||
-f lib/m2/fork.c \
|
||||
-f lib/m2/execve.c \
|
||||
-f lib/m2/execv.c \
|
||||
-f lib/m2/waitpid.c \
|
||||
-f lib/m2/clock_gettime.c \
|
||||
-f lib/m2/time.c \
|
||||
-f lib/m2/_getcwd.c \
|
||||
-f lib/m2/getcwd.c \
|
||||
-f lib/m2/dup.c \
|
||||
-f lib/m2/dup2.c \
|
||||
-f lib/m2/unlink.c \
|
||||
-f lib/m2/strcmp.c \
|
||||
-f lib/m2/memcmp.c \
|
||||
-f src/builtins.c.m2 \
|
||||
-f src/display.c.m2 \
|
||||
-f src/eval-apply.c.m2 \
|
||||
-f src/gc.c.m2 \
|
||||
-f src/hash.c.m2 \
|
||||
-f src/lib.c.m2 \
|
||||
-f src/math.c.m2 \
|
||||
-f src/mes.c.m2 \
|
||||
-f src/module.c.m2 \
|
||||
-f src/posix.c.m2 \
|
||||
-f src/reader.c.m2 \
|
||||
-f src/string.c.m2 \
|
||||
-f src/struct.c.m2 \
|
||||
-f src/symbols.c.m2 \
|
||||
-f src/vector.c.m2 \
|
||||
-o bin/mes.M1
|
||||
|
||||
blood-elf -f bin/mes.M1 -o bin/mes.blood-elf-M1
|
||||
|
||||
M1 \
|
||||
--LittleEndian \
|
||||
--architecture x86 \
|
||||
-f lib/m2/x86/x86_defs.M1 \
|
||||
-f lib/x86-mes/x86.M1 \
|
||||
-f lib/linux/x86-mes-m2/crt1.M1 \
|
||||
-f bin/mes.M1 \
|
||||
-f bin/mes.blood-elf-M1 \
|
||||
-o bin/mes.hex2
|
||||
|
||||
hex2 \
|
||||
--LittleEndian \
|
||||
--architecture x86 \
|
||||
--BaseAddress 0x1000000 \
|
||||
--exec_enable \
|
||||
-f lib/x86-mes/elf32-header.hex2 \
|
||||
-f bin/mes.hex2 \
|
||||
-f lib/m2/missing.hex2 \
|
||||
-o bin/mes-m2
|
||||
|
||||
echo Running mes-m2
|
||||
./bin/mes-m2 --boot scaffold/boot/14-exit.scm
|
||||
#./bin/mes-m2 --boot scaffold/boot/15-display.scm
|
|
@ -21,7 +21,7 @@
|
|||
#include <mes/lib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
int
|
||||
long
|
||||
abtol (char **p, int base)
|
||||
{
|
||||
char *s = p[0];
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
char *__itoa_buf;
|
||||
|
||||
char *
|
||||
ntoab (int x, int base, int signed_p)
|
||||
ntoab (long x, int base, int signed_p)
|
||||
{
|
||||
if (__itoa_buf == 0)
|
||||
__itoa_buf = malloc (20);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
int
|
||||
strncmp (char *a, char *b, int size)
|
||||
strncmp (char const *a, char const *b, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue