mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:58:09 +11:00
Move /emul/forth/* to /emul
Less noisy this way
This commit is contained in:
parent
816563e2e3
commit
1bd191e86a
13
emul/.gitignore
vendored
13
emul/.gitignore
vendored
@ -1,7 +1,8 @@
|
|||||||
/forth/stage1
|
/stage1
|
||||||
/forth/stage1dbg
|
/stage1dbg
|
||||||
/forth/stage2
|
/stage2
|
||||||
/forth/forth
|
/forth
|
||||||
/*/*-bin.h
|
/*-bin.h
|
||||||
/*/*.bin
|
/core.bin
|
||||||
|
/forth?.bin
|
||||||
/blkfs
|
/blkfs
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
TARGETS = forth/forth forth/stage2
|
TARGETS = forth stage2
|
||||||
# Those Forth source files are in a particular order
|
# Those Forth source files are in a particular order
|
||||||
FORTHSRCS = core.fs cmp.fs print.fs parse.fs readln.fs fmt.fs blk.fs
|
FORTHSRCS = core.fs cmp.fs print.fs parse.fs readln.fs fmt.fs blk.fs
|
||||||
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%} forth/run.fs
|
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%} run.fs
|
||||||
OBJS = emul.o libz80/libz80.o
|
OBJS = emul.o libz80/libz80.o
|
||||||
SLATEST = ../tools/slatest
|
SLATEST = ../tools/slatest
|
||||||
STRIPFC = ../tools/stripfc
|
STRIPFC = ../tools/stripfc
|
||||||
@ -23,43 +23,43 @@ $(BLKUNPACK): $(BLKPACK)
|
|||||||
|
|
||||||
# z80c.bin is not in the prerequisites because it's a bootstrap
|
# z80c.bin is not in the prerequisites because it's a bootstrap
|
||||||
# binary that should be updated manually through make updatebootstrap.
|
# binary that should be updated manually through make updatebootstrap.
|
||||||
forth/forth0.bin: $(SLATEST)
|
forth0.bin: $(SLATEST)
|
||||||
cp forth/z80c.bin $@
|
cp z80c.bin $@
|
||||||
$(SLATEST) $@
|
$(SLATEST) $@
|
||||||
cat forth/pre.fs forth/emul.fs >> $@
|
cat pre.fs emul.fs >> $@
|
||||||
|
|
||||||
forth/forth0-bin.h: forth/forth0.bin $(BIN2C)
|
forth0-bin.h: forth0.bin $(BIN2C)
|
||||||
$(BIN2C) KERNEL < forth/forth0.bin | tee $@ > /dev/null
|
$(BIN2C) KERNEL < forth0.bin | tee $@ > /dev/null
|
||||||
|
|
||||||
forth/stage1: forth/stage.c $(OBJS) forth/forth0-bin.h
|
stage1: stage.c $(OBJS) forth0-bin.h
|
||||||
$(CC) forth/stage.c $(OBJS) -o $@
|
$(CC) stage.c $(OBJS) -o $@
|
||||||
|
|
||||||
forth/stage1dbg: forth/stage.c $(OBJS) forth/forth0-bin.h
|
stage1dbg: stage.c $(OBJS) forth0-bin.h
|
||||||
$(CC) -DDEBUG forth/stage.c $(OBJS) -o $@
|
$(CC) -DDEBUG stage.c $(OBJS) -o $@
|
||||||
|
|
||||||
# We don't really need to use stripfc, but we do it anyway to test that we
|
# We don't really need to use stripfc, but we do it anyway to test that we
|
||||||
# don't mistakenly break our code with that tool. It's easier to debug here.
|
# don't mistakenly break our code with that tool. It's easier to debug here.
|
||||||
forth/core.bin: $(FORTHSRC_PATHS) forth/stage1
|
core.bin: $(FORTHSRC_PATHS) stage1
|
||||||
cat $(FORTHSRC_PATHS) ./forth/stop.fs | $(STRIPFC) | ./forth/stage1 > $@
|
cat $(FORTHSRC_PATHS) stop.fs | $(STRIPFC) | ./stage1 > $@
|
||||||
|
|
||||||
forth/forth1.bin: forth/core.bin $(SLATEST)
|
forth1.bin: core.bin $(SLATEST)
|
||||||
cat forth/z80c.bin forth/core.bin > $@
|
cat z80c.bin core.bin > $@
|
||||||
$(SLATEST) $@
|
$(SLATEST) $@
|
||||||
|
|
||||||
forth/forth1-bin.h: forth/forth1.bin $(BIN2C)
|
forth1-bin.h: forth1.bin $(BIN2C)
|
||||||
$(BIN2C) KERNEL < forth/forth1.bin > $@
|
$(BIN2C) KERNEL < forth1.bin > $@
|
||||||
|
|
||||||
forth/stage2: forth/stage.c $(OBJS) forth/forth1-bin.h forth/blkfs-bin.h
|
stage2: stage.c $(OBJS) forth1-bin.h blkfs-bin.h
|
||||||
$(CC) -DSTAGE2 forth/stage.c $(OBJS) -o $@
|
$(CC) -DSTAGE2 stage.c $(OBJS) -o $@
|
||||||
|
|
||||||
blkfs: $(BLKPACK)
|
blkfs: $(BLKPACK)
|
||||||
$(BLKPACK) ../blk > $@
|
$(BLKPACK) ../blk > $@
|
||||||
|
|
||||||
forth/blkfs-bin.h: blkfs $(BIN2C)
|
blkfs-bin.h: blkfs $(BIN2C)
|
||||||
$(BIN2C) BLKFS < blkfs > $@
|
$(BIN2C) BLKFS < blkfs > $@
|
||||||
|
|
||||||
forth/forth: forth/forth.c $(OBJS) forth/forth1-bin.h blkfs
|
forth: forth.c $(OBJS) forth1-bin.h blkfs
|
||||||
$(CC) forth/forth.c $(OBJS) -o $@
|
$(CC) forth.c $(OBJS) -o $@
|
||||||
|
|
||||||
libz80/libz80.o: libz80/z80.c
|
libz80/libz80.o: libz80/z80.c
|
||||||
$(MAKE) -C libz80/codegen opcodes
|
$(MAKE) -C libz80/codegen opcodes
|
||||||
@ -70,8 +70,8 @@ emul.o: emul.c
|
|||||||
|
|
||||||
|
|
||||||
.PHONY: updatebootstrap
|
.PHONY: updatebootstrap
|
||||||
updatebootstrap: forth/stage2
|
updatebootstrap: stage2
|
||||||
cat ./forth/xcomp.fs | ./forth/stage2 > ./forth/z80c.bin
|
cat xcomp.fs | ./stage2 > z80c.bin
|
||||||
|
|
||||||
.PHONY: pack
|
.PHONY: pack
|
||||||
pack:
|
pack:
|
||||||
@ -83,5 +83,5 @@ unpack:
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGETS) emul.o forth/*-bin.h forth/forth?.bin blkfs
|
rm -f $(TARGETS) emul.o *-bin.h forth?.bin blkfs
|
||||||
$(MAKE) -C ../tools clean
|
$(MAKE) -C ../tools clean
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include "../emul.h"
|
#include "emul.h"
|
||||||
#include "forth1-bin.h"
|
#include "forth1-bin.h"
|
||||||
|
|
||||||
// in sync with glue.asm
|
// in sync with glue.asm
|
@ -1,7 +1,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "../emul.h"
|
#include "emul.h"
|
||||||
#ifdef STAGE2
|
#ifdef STAGE2
|
||||||
#include "forth1-bin.h"
|
#include "forth1-bin.h"
|
||||||
#include "blkfs-bin.h"
|
#include "blkfs-bin.h"
|
@ -1,7 +1,7 @@
|
|||||||
TARGET = stage1.bin
|
TARGET = stage1.bin
|
||||||
BASEDIR = ../..
|
BASEDIR = ../..
|
||||||
FDIR = $(BASEDIR)/forth
|
FDIR = $(BASEDIR)/forth
|
||||||
EDIR = $(BASEDIR)/emul/forth
|
EDIR = $(BASEDIR)/emul
|
||||||
STAGE2 = $(EDIR)/stage2
|
STAGE2 = $(EDIR)/stage2
|
||||||
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
|
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
|
||||||
|
|
||||||
@ -36,4 +36,3 @@ $(EMUL):
|
|||||||
.PHONY: emul
|
.PHONY: emul
|
||||||
emul: $(EMUL) $(TARGET)
|
emul: $(EMUL) $(TARGET)
|
||||||
$(EMUL) $(TARGET)
|
$(EMUL) $(TARGET)
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
: (c<) KEY DUP EMIT ;
|
: (c<) KEY DUP EMIT ;
|
||||||
: INIT
|
: _
|
||||||
ACIA$
|
ACIA$
|
||||||
." Collapse OS" CRLF
|
." Collapse OS" CRLF
|
||||||
( 0c == CINPTR )
|
( 0c == CINPTR )
|
||||||
['] (c<) 0x0c RAM+ !
|
['] (c<) 0x0c RAM+ !
|
||||||
;
|
; _
|
||||||
INIT
|
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ EMULDIR = ../emul
|
|||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run:
|
||||||
$(MAKE) -C $(EMULDIR) forth/forth
|
$(MAKE) -C $(EMULDIR) all
|
||||||
cd forth && ./runtests.sh
|
cd forth && ./runtests.sh
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
BASE=../..
|
BASE=../..
|
||||||
EXEC="${BASE}/emul/forth/forth"
|
EXEC="${BASE}/emul/forth"
|
||||||
FDIR="${BASE}/forth"
|
|
||||||
TMP=$(mktemp)
|
TMP=$(mktemp)
|
||||||
|
|
||||||
chk() {
|
chk() {
|
||||||
|
Loading…
Reference in New Issue
Block a user