Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
gforth
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bernd Paysan
gforth
Commits
1e1aa248
Commit
1e1aa248
authored
Nov 07, 1995
by
anton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added copyright headers
changes to loadfilename & co. to make savesystem transparent to assertions and ~~
parent
cd00d247
Changes
78
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
1477 additions
and
138 deletions
+1477
-138
32bit.h
32bit.h
+18
-2
386.h
386.h
+18
-2
INSTALL
INSTALL
+8
-8
Makefile.in
Makefile.in
+29
-8
add.fs
add.fs
+17
-0
alpha.h
alpha.h
+22
-2
ansi.fs
ansi.fs
+19
-0
anslocal.fs
anslocal.fs
+2
-0
assert.fs
assert.fs
+23
-7
blocks.fs
blocks.fs
+20
-1
bufio.fs
bufio.fs
+18
-0
cache.c
cache.c
+21
-0
code.fs
code.fs
+18
-0
colorize.fs
colorize.fs
+18
-0
cross.fs
cross.fs
+18
-2
debug.fs
debug.fs
+18
-0
debugging.fs
debugging.fs
+23
-5
doskey.fs
doskey.fs
+18
-0
ds2texi.fs
ds2texi.fs
+18
-0
dumpimage.fs
dumpimage.fs
+18
-0
engine.c
engine.c
+19
-2
environ.fs
environ.fs
+18
-0
errore.fs
errore.fs
+19
-0
etags.fs
etags.fs
+19
-0
extend.fs
extend.fs
+19
-0
float.fs
float.fs
+18
-0
forth.h
forth.h
+19
-4
gforth.1
gforth.1
+2
-2
gforth.ds
gforth.ds
+4
-4
gforth.el
gforth.el
+4
-5
glocals.fs
glocals.fs
+21
-0
gray.fs
gray.fs
+2
-2
hash.fs
hash.fs
+18
-0
history.fs
history.fs
+18
-0
hppa.h
hppa.h
+18
-4
io-dos.h
io-dos.h
+20
-1
io.c
io.c
+20
-2
io.h
io.h
+20
-1
kernal.fs
kernal.fs
+28
-5
locals.fs
locals.fs
+18
-0
look.fs
look.fs
+18
-0
m68k.h
m68k.h
+18
-4
mach16b.fs
mach16b.fs
+18
-0
mach16l.fs
mach16l.fs
+18
-0
mach32b.fs
mach32b.fs
+18
-0
mach32l.fs
mach32l.fs
+18
-0
mach64b.fs
mach64b.fs
+18
-0
mach64l.fs
mach64l.fs
+18
-0
main.c
main.c
+26
-6
main.fs
main.fs
+18
-0
makedoc.fs
makedoc.fs
+20
-0
makefile.dos
makefile.dos
+70
-35
memcmp.c
memcmp.c
+21
-0
memmove.c
memmove.c
+21
-0
mips.h
mips.h
+18
-3
model
model
+20
-4
other.fs
other.fs
+19
-0
pow10.c
pow10.c
+20
-0
power.h
power.h
+18
-3
primitives
primitives
+21
-2
prims2x.fs
prims2x.fs
+21
-0
random.fs
random.fs
+18
-0
search-order.fs
search-order.fs
+18
-0
see.fs
see.fs
+19
-0
select.c
select.c
+22
-1
sparc.h
sparc.h
+18
-4
startup.dos
startup.dos
+18
-0
startup.fs
startup.fs
+18
-0
strerror.c
strerror.c
+21
-0
strsignal.c
strsignal.c
+21
-0
struct.fs
struct.fs
+20
-1
threading.h
threading.h
+25
-4
tools.fs
tools.fs
+18
-0
toolsext.fs
toolsext.fs
+19
-0
vars.fs
vars.fs
+23
-2
vt100.fs
vt100.fs
+18
-0
vt100key.fs
vt100key.fs
+18
-0
wordinfo.fs
wordinfo.fs
+18
-0
No files found.
32bit.h
View file @
1e1aa248
/*
Copyright 1992 by the ANSI figForth Development Group
This is a generic file for 32-bit machines with IEEE FP arithmetic (no VMS).
It only supports indirect threading.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of Gforth.
Gforth 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Cell and UCell must be the same size as a pointer */
...
...
386.h
View file @
1e1aa248
/*
Copyright 1992 by the ANSI figForth Development Group
This is the machine-specific part for Intel 386 compatible processors
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of Gforth.
Gforth 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "32bit.h"
...
...
INSTALL
View file @
1e1aa248
...
...
@@ -67,19 +67,19 @@ You need to read this only if you see a message like
"gforth: Cannot load nonrelocatable image (compiled for address 0x1234) at address 0x5678
The Gforth installer should look into the INSTALL file"
Gforth supports relocatable and fixed-address images. If you load
Gforth supports
both
relocatable and fixed-address images. If you load
normal Forth code and save the image, you get a fixed-address
image. Producing a relocatable image is more difficult.
Consequently
, Gforth has only a relocatable image of the kernel
Therefore
, Gforth has only a relocatable image of the kernel
(kernal.fi), which is powerful enough to load the rest of
Gforth. However, loading the rest takes a noticable amount of time. To
avoid this delay
on every startup,the installation procedure produces
an image fixed at an address determined at the Gforth run that
produced the image. This fixed-address image is loaded by default. On
most OSs this works, because the first chunk of memory is always
allocated at the same address. If the address changes, you get th
e
message above.
avoid this delay
(which would occur on every startup), the
installation procedure produces an image fixed at an address
determined at the Gforth run that produced the image. This
fixed-address image is loaded by default. On most OSs this works,
because the first chunk of memory is always allocated at the sam
e
address. If the address changes, you get the
message above.
An image address change can be caused by a change of the gforth
executable, or by a change (upgrade) of the OS; in these cases you
...
...
Makefile.in
View file @
1e1aa248
#Copyright 1992 by the ANSI figForth Development Group
#Makefile for Gforth
#Copyright (C) 1995 Free Software Foundation, Inc.
#This file is part of Gforth.
#Gforth 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 2
#of the License, or (at your option) any later version.
#This program 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 this program; if not, write to the Free Software
#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
...
...
@@ -21,7 +40,7 @@ FORTH = ./gforth
FORTHK
=
$(FORTH)
-p
.
-i
kernal.fi
STRIP
=
strip
TEXI2DVI
=
texi2dvi
DVI2PS
=
dvips
DVI2PS
=
dvips
-D300
#you can get texi2html from http://asis01.cern.ch/infohtml/texi2html.html
TEXI2HTML
=
texi2html
MAKEINFO
=
makeinfo
...
...
@@ -50,7 +69,7 @@ infodir = $(prefix)/info
mandir
=
$(prefix)
/man/man1
INCLUDES
=
forth.h threading.h io.h
INCLUDES
=
forth.h threading.h io.h
io-dos.h
KERN_SRC
=
main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs
\
errore.fs kernal.fs version.fs extend.fs tools.fs toolsext.fs
...
...
@@ -61,7 +80,7 @@ FORTH_SRC = anslocal.fs add.fs assert.fs ansi.fs answords.fs blocks.fs bufio.fs
float.fs glocals.fs glosgen.fs gray.fs hash.fs history.fs
\
kernal.fs locals-test.fs look.fs main.fs makedoc.fs
\
mach16b.fs mach16l.fs mach32b.fs mach32l.fs mach64b.fs mach64l.fs
\
other.fs prims2x.fs random.fs search-order.fs see.fs sieve.fs
\
other.fs prims2x.fs random.fs search-order.fs see.fs sieve.fs
source.fs
\
startup.fs struct.fs tools.fs toolsext.fs tt.fs vars.fs vt100.fs
\
vt100key.fs wordinfo.fs wordsets.fs
\
tester.fs coretest.fs
...
...
@@ -90,6 +109,8 @@ FORTH_GEN = $(FORTH_GEN0) @KERNAL@ gforth.fi
# this is used for antidependences,
FORTH_GEN1
=
$(FORTH_GEN0)
@kernal_fi@
#distributed documentation
DOCDIST
=
gforth.texi gforth.fns gforth.ps gforth.info
*
KERNLS
=
kernl16b.fi+ kernl16l.fi+
\
kernl32b.fi+ kernl32l.fi+
\
...
...
@@ -129,10 +150,10 @@ distclean: clean
realclean
:
distclean
-
$(RM)
$(GEN_PRECIOUS)
dist
:
$(SOURCES) $(FORTH_GEN)
dist
:
$(SOURCES) $(FORTH_GEN)
$(DOCDIST)
-
rm
-rf
gforth-
$(VERSION)
mkdir
gforth-
$(VERSION)
cp
-p
$(SOURCES)
$(FORTH_GEN)
gforth-
$(VERSION)
cp
-p
$(SOURCES)
$(FORTH_GEN
0)
@KERNAL@
$(DOCDIST
)
gforth-
$(VERSION)
tar
cvf - gforth-
$(VERSION)
|gzip
-9
>
gforth-
$(VERSION)
.tar.gz
-
rm
-rf
gforth-
$(VERSION)
...
...
@@ -183,7 +204,7 @@ test: gforth
@
echo
'Expect to see INCORRECT RESULT: { GS1 -> <TRUE> <TRUE> }'
@
echo
'This is a bug of the testing program'
$(FORTH)
tester.fs coretest.fs
-e
bye
$(FORTH)
startup.fs blocks.fs
code.fs checkans.fs
-e
bye
$(FORTH)
code.fs checkans.fs
-e
bye
@
echo
'Expect no differences'
$(FORTH)
prims2x.fs
-e
"s
\"
primitives.b
\"
' output-c process-file bye"
| diff
-c
- primitives.i
...
...
@@ -242,7 +263,7 @@ kernl64l.fi: $(KERNLS)
-
$(CP)
kernl64l.fi+ kernl64l.fi
@
LINK_KERNL64L@
gforth.fi
:
@kernal_fi@ gforth startup.fs glocals.fs search-order.fs hash.fs float.fs debugging.fs environ.fs wordinfo.fs look.fs vt100.fs see.fs bufio.fs debug.fs history.fs vt100key.fs assert.fs blocks.fs struct.fs dumpimage.fs
gforth.fi
:
@kernal_fi@ gforth startup.fs glocals.fs search-order.fs hash.fs float.fs debugging.fs environ.fs wordinfo.fs look.fs vt100.fs see.fs bufio.fs debug.fs history.fs vt100key.fs assert.fs
source.fs
blocks.fs struct.fs dumpimage.fs
$(FORTHK)
startup.fs dumpimage.fs
-e
"savesystem gforth.fi bye"
engine.s
:
engine.c primitives.i prim_labels.i machine.h threading.h $(INCLUDES)
...
...
add.fs
View file @
1e1aa248
\
ADD
.
FS
Kernal
additional
things
20
may93jaw
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
linked
list
primitive
:
linked
here
over
@
a
,
swap
!
;
...
...
alpha.h
View file @
1e1aa248
/* preliminary machine file for DEC Alpha */
/* Be carefully: long long on Alpha are 64 bit :-(( */
/* preliminary machine file for DEC Alpha
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of Gforth.
Gforth 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Be careful: long long on Alpha are 64 bit :-(( */
#ifdef DIRECT_THREADED
#undefine DIRECT_THREADED
...
...
ansi.fs
View file @
1e1aa248
\
ANSI
.
STR
Define
terminal
attributes
20
may93jaw
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
If
you
want
another
terminal
you
can
redefine
\
the
colours
.
...
...
anslocal.fs
View file @
1e1aa248
\
This
implements
a
subset
of
the
gforth
locals
syntax
in
pure
ANS
Forth
\
This
file
is
in
the
public
domain
.
NO
WARRANTY
.
\
This
implementation
technique
has
been
described
by
John
Hayes
in
\
the
SigForth
Newsletter
4
(
2
),
Fall
'
92
.
He
did
not
do
the
complete
\
job
,
but
left
some
more
mundane
parts
as
an
exercise
to
the
reader
.
...
...
assert.fs
View file @
1e1aa248
\
assertions
\
!!
factor
out
line
number
printing
,
share
with
debugging
.
fs
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
require
source
.
fs
variable
assert
-
level
(
--
a
-
addr
)
\
gforth
\
G
all
assertions
above
this
level
are
turned
off
...
...
@@ -31,16 +49,14 @@ variable assert-level ( -- a-addr ) \ gforth
POSTPONE
assert1
(
;
immediate
:
(
endassert
)
(
flag
--
)
\
gforth
-
internal
\
three
inline
argument
s
\
inline
argument
sourcepo
s
if
r
>
3
cells
+
>
r
EXIT
r
>
sourcepos
drop
+
>
r
EXIT
else
r
>
dup
2
@
type
.
" :"
cell
+
cell
+
@
0
.
r
.
" : failed assertion"
r
>
print
-
sourcepos
.
" : failed assertion"
true
abort
" assertion failed"
\
!!
or
use
a
new
throw
code
?
then
;
:
)
(
--
)
\
gforth
close
-
paren
\
G
end
an
assertion
POSTPONE
(
endassert
)
loadfilename
2
@
2
,
loadline
@
,
;
immediate
POSTPONE
(
endassert
)
sourcepos
,
;
immediate
blocks.fs
View file @
1e1aa248
\
A
less
simple
implementation
of
the
blocks
wordset
.
\
An
more
efficient
implementation
would
use
mmap
on
OSs
that
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
A
more
efficient
implementation
would
use
mmap
on
OSs
that
\
provide
it
and
many
buffers
on
OSs
that
do
not
provide
mmap
.
\
Now
,
the
replacement
algorithm
is
"direct mapped"
;
change
to
LRU
...
...
bufio.fs
View file @
1e1aa248
\
BUFOUT
.
STR
Buffered
output
for
Debug
13
jun93jaw
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
CREATE
O
-
Buffer
4000
chars
allot
align
VARIABLE
O
-
PNT
...
...
cache.c
View file @
1e1aa248
/* cache flushing for the HP-PA architecture
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of Gforth.
Gforth 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
void
cacheflush
(
void
*
address
,
int
size
,
int
linewidth
)
{
int
i
;
...
...
code.fs
View file @
1e1aa248
\
ASSEMBLER
,
CODE
etc
.
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
does
not
include
the
actual
assembler
(
which
is
machine
-
dependent
),
\
only
words
like
CODE
that
are
implementation
-
dependent
,
but
can
be
\
defined
for
all
machines
.
...
...
colorize.fs
View file @
1e1aa248
\
COLORIZE
.
STR
Coloured
.
NAME
and
WORDS
20
may93jaw
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
include
ansi
.
fs
decimal
...
...
cross.fs
View file @
1e1aa248
\
CROSS
.
FS
The
Cross
-
Compiler
06
oct92py
\
$
Id
:
cross
.
fs
,
v
1
.
29
1995
-
10
-
07
17
:
38
:
11
anton
Exp
$
\
Idea
and
implementation
:
Bernd
Paysan
(
py
)
\
Copyright
1992
-
94
by
the
GNU
Forth
Development
Group
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
Log
:
\
changed
in
;
[
to
state
off
12
may93jaw
...
...
debug.fs
View file @
1e1aa248
\
DEBUG
.
FS
Debugger
12
jun93jaw
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
decimal
VARIABLE
IP
\
istruction
pointer
for
debugger
...
...
debugging.fs
View file @
1e1aa248
\
Simple
debugging
aids
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
They
are
meant
to
support
a
different
style
of
debugging
than
the
\
tracing
/
stepping
debuggers
used
in
languages
with
long
turn
-
around
\
times
.
...
...
@@ -15,15 +34,14 @@
\
of
the
pictured
numeric
output
string
(
i
.
e
.,
don't
use
~~
between
<#
\
and
#>).
require
source
.
fs
defer
printdebugdata
(
--
)
\
gforth
'
.
s
IS
printdebugdata
defer
printdebugline
(
addr
--
)
\
gforth
:
(
printdebugline
)
(
addr
--
)
cr
dup
2
@
type
.
" :"
cell
+
cell
+
@
0
.
r
.
" :"
cr
print
-
sourcepos
.
" :"
\
it
would
be
nice
to
print
the
name
of
the
following
word
,
\
but
that's
not
easily
possible
for
primitives
printdebugdata
...
...
@@ -33,8 +51,8 @@ defer printdebugline ( addr -- ) \ gforth
:
(~~)
(
--
)
r
@
printdebugline
r
>
3
cells
+
>
r
;
r
>
sourcepos
drop
+
>
r
;
:
~~
(
compilation
--
;
run
-
time
--
)
\
gforth
tilde
-
tilde
POSTPONE
(~~)
loadfilename
2
@
2
,
loadline
@
,
;
immediate
POSTPONE
(~~)
sourcepos
,
;
immediate
doskey.fs
View file @
1e1aa248
\
MS
-
DOS
key
interpreter
17
oct94py
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
Create
translate
$
100
allot
translate
$
100
erase
...
...
ds2texi.fs
View file @
1e1aa248
\
documentation
source
to
texi
format
converter
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
\
documentation
source
can
contain
lines
in
the
form
`
doc
-
word'
and
\
`
short
-
word'
.
These
are
converted
to
appropriate
full
or
short
\
(
without
the
description
)
glossary
entries
for
word
.
...
...
dumpimage.fs
View file @
1e1aa248
\
image
dump
15
nov94py
\
Copyright
(
C
)
1995
Free
Software
Foundation
,
Inc
.
\
This
file
is
part
of
Gforth
.
\
Gforth
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
2
\
of
the
License
,
or
(
at
your
option
)
any
later
version
.
\
This
program
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
this
program
;
if
not
,
write
to
the
Free
Software
\
Foundation
,
Inc
.
,
675
Mass
Ave
,
Cambridge
,
MA
02139
,
USA
.
Create
magic
s
" gforth00"
here
over
allot
swap
move
'
1
1
cells
+
0
pad
!
-
1
pad
c
!
pad
@
0
<
+
magic
7
chars
+
c
!
...
...
engine.c
View file @
1e1aa248
/*
Copyright 1992 by the ANSI figForth Development Group
/* Gforth virtual machine (aka inner interpreter)
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of Gforth.