Commit b727d802 authored by Bernd Paysan's avatar Bernd Paysan
Browse files

Mega-Patch; lots of changes

parent 1a243cc2
Loading
Loading
Loading
Loading
+57 −8
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@
# ------------- gforth version

VERSION_MAJOR=0
VERSION_MINOR=3
VERSION_RELEASE=1
VERSION_MINOR=4
VERSION_RELEASE=0
VERSION	=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
DOSVERSION=$(VERSION_MAJOR)$(VERSION_MINOR)$(VERSION_RELEASE)

@@ -131,12 +131,30 @@ KERN_SRC = \
	kernel/vars.fs \
	kernel/accept.fs \
	kernel/basics.fs \
	kernel/interp.fs \
	kernel/int.fs \
	kernel/comp.fs \
	kernel/io.fs \
	kernel/license.fs \
	kernel/nio.fs \
	kernel/saccept.fs

EC_SRC = \
	asm/00-readme \
	asm/bitmask.fs \
	asm/numref.fs \
	asm/basic.fs \
	asm/generic.fs \
	asm/target.fs \
	ec/00-readme \
	ec/crossdoc.fd \
	ec/mirror.fs \
	ec/mirrors.fs \
	ec/shex.fs \
	ec/builttag.fs \
	ec/dotx.fs \
	ec/mirrored.fs \
	ec/nesting.fs

GFORTH_FI_SRC = \
	assert.fs \
	blocked.fb \
@@ -171,7 +189,7 @@ GFORTH_FI_SRC = \
	sieve.fs \
	add.fs

FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) \
FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) $(EC_SRC) \
	ans-report.fs ansi.fs answords.fs \
	code.fs colorize.fs comp-i.fs \
	doskey.fs ds2texi.fs \
@@ -213,7 +231,30 @@ ARCHS = arch/generic/machine.h \
	arch/misc/prim.fs \
	arch/misc/sim.fs \
	arch/misc/sokoban.fs \
	arch/misc/tt.fs
	arch/misc/tt.fs \
	arch/6502/asm.fs \
	arch/6502/prim.fs \
	arch/6502/mach.fs \
	arch/6502/zero.fs \
	arch/6502/softuart.fs \
	arch/6502/cold.fs \
	arch/8086/asm.fs \
	arch/8086/mach.fs \
	arch/8086/mach.sh \
	arch/8086/prim.fs \
	arch/avr/asm.fs \
	arch/c165/asm.fs \
	arch/c165/mach.fs \
	arch/c165/prim.fs \
	arch/h8/asm.fs \
	arch/shboom/asm.fs \
	arch/shboom/compiler.fs \
	arch/shboom/dis.fs \
	arch/shboom/mach.fs \
	arch/shboom/prim.fs \
	arch/shboom/dis2.fs \
	arch/shboom/sh.p \
	arch/shboom/doers.fs

SOURCES	= CVS compat Makefile.in engine/Makefile.in gforthmi \
	configure.in configure config.sub config.guess \
@@ -445,7 +486,7 @@ check test: gforth gforth.fi
		$(FORTH) test/other.fs -e bye
		$(FORTH) code.fs test/checkans.fs -e bye
		@echo 'Expect no differences'
		$(FORTH) -m 100000 prims2x.fs -e "s\" $(srcdir)/prim.b\"' output-c process-file bye"| diff -c - $(srcdir)/engine/prim.i
		$(FORTHK) -m 100000 prims2x.fs -e "s\" $(srcdir)/prim.b\"' output-c process-file bye"| diff -c - $(srcdir)/engine/prim.i

bench:		gforth gforth.fi
		@echo 'Each benchmark takes about 30s on a 486-66 (gcc-2.6.3 -DFORCE_REG)'
@@ -556,10 +597,10 @@ kernel/prim.fs: prim.b prims2x.fs kernel/prim0.fs
		$(RM) $@-

engine:		engine/prim_lab.i engine/prim.i engine/version.h FORCE
		bash makein.bsh engine engine
		$(MAKE) -C engine engine

engine_ditc:	engine/prim_lab.i engine/prim.i engine/version.h FORCE
		bash makein.bsh engine engine_ditc
		$(MAKE) -C engine engine_ditc

gforth:		engine
		-$(CP) gforth gforth~
@@ -570,6 +611,14 @@ gforth-ditc: engine_ditc
		$(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(OBJECTS0) $(LDLIBS) -o $@
		@GFORTHDITC_EXE@

# ------------- additional C primitives

%.c:		%.pri prim2cl.fs
		$(FORTHK) prim2cl.fs -e "file $< altogether bye" >$@

%.so:		%.c
		$(GCC) -shared $(CFLAGS) $< -o $@

# -------------	Make Documentation

#TAGS is a GNU standard target
+25 −11
Original line number Diff line number Diff line
@@ -31,19 +31,33 @@

true  Constant NIL  \ relocating

false Constant has-files 
false Constant has-OS
false Constant has-prims
false Constant has-floats
false Constant has-locals
false Constant has-dcomps
false Constant has-hash
false Constant has-xconds
false Constant has-header
false Constant ITC

: prims-include  ." Include primitives" cr s" arch/4stack/prim.fs" included ;
: asm-include    ." Include assembler" cr s" arch/4stack/asm.fs" included ;

: >boot
    S" ' boot >body $800 ! here $804 !" evaluate ;

>ENVIRON

false Constant file		\ controls the presence of the
				\ file access wordset
false Constant OS		\ flag to indicate a operating system

false Constant prims		\ true: primitives are c-code

false Constant floating		\ floating point wordset is present

false Constant glocals		\ gforth locals are present
				\ will be loaded
false Constant dcomps		\ double number comparisons

false Constant hash		\ hashing primitives are loaded/present

false Constant xconds		\ used together with glocals,
				\ special conditionals supporting gforths'
				\ local variables
false Constant header		\ save a header information

false Constant ec
false Constant crlf
false Constant ITC
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
#define FLUSH_ICACHE(addr,size) \
			cacheflush((char *)(addr), (int)(size), BCACHE)

#include "../../engine/32bit.h"
#include "../../machine/32bit.h"

#ifdef DIRECT_THREADED
/* some definitions for composing opcodes */
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ also assembler also definitions forth
$0 Constant PC		$1 Constant PC+2
$2 Constant PC+4	$3 Constant PC+6

$7 Constant *ACCU
$8 Constant ACCU	$9 Constant SF
$A Constant ZF		$C Constant CF

@@ -17,6 +16,7 @@ $A Constant ZF $C Constant CF
$0 Constant JMP		$1 Constant JS
$2 Constant JZ		$4 Constant JC

$7 Constant *ACCU
( $8 Constant ACCU )	$9 Constant SUB
( $A Constant SUBR )	$B Constant ADD
$C Constant XOR		$D Constant OR
+20 −12
Original line number Diff line number Diff line
@@ -40,16 +40,24 @@ false Constant NIL \ relocating

>ENVIRON

false Constant file
false Constant OS
false Constant prims
false Constant floating
false Constant glocals
false Constant dcomps
false Constant hash
false Constant xconds
false Constant header
true  Constant ec
true  Constant crlf
true  Constant ITC
false Constant file		\ controls the presence of the
				\ file access wordset
false Constant OS		\ flag to indicate a operating system

false Constant prims		\ true: primitives are c-code

false Constant floating		\ floating point wordset is present

false Constant glocals		\ gforth locals are present
				\ will be loaded
false Constant dcomps		\ double number comparisons

false Constant hash		\ hashing primitives are loaded/present

false Constant xconds		\ used together with glocals,
				\ special conditionals supporting gforths'
				\ local variables
false Constant header		\ save a header information

true Constant ec
false Constant crlf
Loading