100+ results for 'forth'
Not the results you expected?
trace.fth (https://github.com/philburk/pforth.git) Forth · 460 lines
1 \ @(#) trace.fth 98/01/28 1.2
2 \ TRACE ( <name> -- , trace pForth word )
3 \
4 \ Single step debugger.
5 \ TRACE ( i*x <name> -- , setup trace for Forth word )
6 \ S ( -- , step over )
7 \ SM ( many -- , step over many times )
10 \ GD ( n -- , go down N levels from current level, stop at end of this level )
11 \
12 \ This debugger works by emulating the inner interpreter of pForth.
13 \ It executes code and maintains a separate return stack for the
14 \ program under test. Thus all primitives that operate on the return
103 ;
105 \ The implementation of these pForth primitives is specific to pForth.
107 variable TRACE-LOCALS-PTR \ point to top of local frame
RetStkDep.fth (https://github.com/mwilbur/openbios.git) Forth · 105 lines
searchordertest.fth (https://github.com/llasram/zmforth.git) Forth · 187 lines
25 \ Words tested in this file are:
26 \ FORTH-WORDLIST GET-ORDER SET-ORDER ALSO ONLY FORTH GET-CURRENT
27 \ SET-CURRENT DEFINITIONS PREVIOUS SEARCH-WORDLIST WORDLIST FIND
28 \ Words not fully tested:
76 T{ ALSO GET-ORDER -> get-orderlist OVER SWAP 1+ }T
77 T{ ONLY FORTH GET-ORDER -> get-orderlist }T \ See assumptions above
79 \ ------------------------------------------------------------------------------
91 Testing minimum search order list contains FORTH-WORDLIST and SET-ORDER
93 : so1 SET-ORDER ; \ In case it is unavailable in the forth wordlist
95 T{ ONLY FORTH-WORDLIST 1 SET-ORDER get-orderlist so1 -> }T
tsuiteyour.frt (https://bitbucket.org/avanderhorst/yourforth.git) Forth · 969 lines
3 \ Modifications have to do with where Hayce moves the interpret
4 \ pointer to the end or begin of the input buffer
5 \ ciforth uses PP instead of >IN
6 \ The jump out of a BEGIN loop, is refused with _SECURITY_( _yes )
7 \ so NO-SECURITY is invoked.
56 \ VERSION 1.0
57 \ It has the test for words replaced by tests for
58 \ the equivalent words in yourforth
60 HEX
111 \ MAY BE DISTRIBUTED FREELY AS LONG AS THIS COPYRIGHT NOTICE REMAINS.
112 \ VERSION 1.0
113 \ THIS PROGRAM TESTS THE CORE WORDS OF AN ANS FORTH SYSTEM.
114 \ THE PROGRAM ASSUMES A TWO'S COMPLEMENT IMPLEMENTATION WHERE
115 \ THE RANGE OF SIGNED NUMBERS IS -2^(N-1) ... 2^(N-1)-1 AND
eforth.4th (https://github.com/sunnysujan/wikireader.git) Forth · 864 lines
1 \ eForth Initial Model (8086)
3 \ Based on bFORTH 1990 by Bill Muench, 1990
4 \ Donated to eForth Working Group, Silicon Valley FIG Chapter
5 \ to serve as a model of portable Forth for experimentation.
36 \ Compiler does not set bits in the NAME string
37 \ 0 < la na < .. < la na < va < CONTEXT @
38 \ 0 < FORTH < .. < vl va < vl va < CURRENT CELL+ @
40 .( Equates )
66 \ IP instruction pointer
68 \ The Forth inner interpreter
69 \
70 \ On the 8086 it is more efficient to compile
aw.fth (https://github.com/mediogre/colorite.git) Forth · 507 lines
toolstest.fth (https://github.com/llasram/zmforth.git) Forth · 161 lines
1 \ To test some of the ANS Forth Programming Tools and extension wordset
3 \ Copyright (C) Gerry Jackson 2006, 2007
14 \ ------------------------------------------------------------------------------
15 \ Version 0.4 6 March 2009 ENDIF changed to THEN. {...} changed to T{...}T
16 \ 0.3 20 April 2007 ANS Forth words changed to upper case
17 \ 0.2 30 Oct 2006 updated following GForth test to avoid
pnp.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 205 lines
trace.fth (https://github.com/mediogre/colorite.git) Forth · 409 lines
1 \ @(#) trace.fth 98/01/28 1.2
2 \ TRACE ( <name> -- , trace pForth word )
3 \
4 \ Single step debugger.
5 \ TRACE ( i*x <name> -- , setup trace for Forth word )
6 \ S ( -- , step over )
7 \ SM ( many -- , step over many times )
10 \ GD ( n -- , go down N levels from current level, stop at end of this level )
11 \
12 \ This debugger works by emulating the inner interpreter of pForth.
13 \ It executes code and maintains a separate return stack for the
14 \ program under test. Thus all primitives that operate on the return
83 trace.restore.state ;
85 \ The implementation of these pForth primitives is specific to pForth.
86 variable TRACE-LOCALS-PTR \ point to top of local frame
pnp.4th (https://github.com/thurday/freebsd.git) Forth · 205 lines
tools.4TH (https://gitlab.com/Blueprint-Marketing/linguist) Forth · 133 lines
check-password.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 179 lines
loader.4th (https://github.com/deathmaker1/kame.git) Forth · 228 lines
23 \ SUCH DAMAGE.
24 \
25 \ $FreeBSD: src/sys/boot/forth/loader.4th,v 1.5 1999/11/24 17:56:39 dcs Exp $
27 include /boot/support.4th
29 only forth definitions also support-functions
31 \ ***** boot-conf
223 : ignore true ; \ For use in load error commands
225 \ Return to strict forth vocabulary
227 only forth also
doubletest.fth (https://github.com/llasram/zmforth.git) Forth · 388 lines
1 \ To test the ANS Forth Double-Number word set and double number extensions
3 \ Copyright (C) Gerry Jackson 2006, 2007, 2009
16 \ Tests rewritten to be independent of word size and
17 \ tests re-ordered
18 \ 0.3 20 April 2007 ANS Forth words changed to upper case
19 \ 0.2 30 Oct 2006 Updated following GForth test to include
frames.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 165 lines
softcore.fr (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 206 lines
loader.4th (https://github.com/thurday/freebsd.git) Forth · 192 lines
46 \ Prepares to boot as specified by loaded configuration files.
48 only forth also support-functions also builtins definitions
50 : boot
83 ;
85 also forth definitions also builtins
87 builtin: boot
88 builtin: boot-conf
90 only forth definitions also support-functions
92 include /boot/check-password.4th
TAlias.fr (http://frege.googlecode.com/svn/) Forth · 75 lines
frames.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 128 lines
test.forth (https://gitlab.com/aguai/punyforth) Forth · 240 lines
check-password.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 170 lines
asm.fr (https://gitlab.com/Blueprint-Marketing/linguist) Forth · 244 lines
pcibios.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 47 lines
fth.misc2.fth (https://github.com/mediogre/colorite.git) Forth · 232 lines
1 \ @(#) misc2.fth 98/01/26 1.2
2 \ Utilities for PForth extracted from HMSL
3 \
4 \ Author: Phil Burk
5 \ Copyright 1994 3DO, Phil Burk, Larry Polansky, Devid Rosenboom
6 \
7 \ The pForth software code is dedicated to the public domain,
8 \ and any third party may reproduce, distribute and modify
9 \ the pForth software code or any derivative works thereof
10 \ without any compensation or license. The pForth software
11 \ code is provided on an "as is" basis without any warranty
12 \ of any kind, including, without limitation, the implied
coreplustest.fth (https://github.com/llasram/zmforth.git) Forth · 101 lines
delay.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 112 lines
brand.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 91 lines
DevNodAli_01.fth (https://github.com/mwilbur/openbios.git) Forth · 159 lines
25 \ I gave some further thought to the question of
26 \ the scope of a alias to a core-function.
27 \ A true FORTH-based tokenizer would place an alias-created definition
28 \ into the "current" vocabulary, regardless of where the target of
29 \ the alias was found. I now believe we should do the same, also.
loader.4th (https://github.com/deathmaker1/kame.git) Forth · 192 lines
fforth_tests.fth (https://github.com/EtchedPixels/FUZIX.git) Forth · 1055 lines
tester.fr (https://github.com/llasram/zmforth.git) Forth · 61 lines
filetest.fth (https://github.com/llasram/zmforth.git) Forth · 205 lines
14 \ ------------------------------------------------------------------------------
15 \ Version 0.4 22 March 2009 { and } replaced with T{ and }T
16 \ 0.3 20 April 2007 ANS Forth words changed to upper case
17 \ Removed directory test from the filenames
18 \ 0.2 30 Oct 2006 updated following GForth tests to remove
shortcuts.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 50 lines
memorytest.fth (https://github.com/llasram/zmforth.git) Forth · 92 lines
1 \ To test the ANS Forth Memory-Allocation word set
3 \ Copyright (C) Gerry Jackson 2006, 2007
14 \ ------------------------------------------------------------------------------
15 \ Version 0.3 6 March 2009 { and } replaced with T{ and }T
16 \ 0.2 20 April 2007 ANS Forth words changed to upper case
17 \ 0.1 October 2006 First version released
exceptiontest.fth (https://github.com/llasram/zmforth.git) Forth · 100 lines
1 \ To test the ANS Forth Exception word set and extension words
3 \ Copyright (C) Gerry Jackson 2006, 2007
14 \ --------------------------------------------------------------------
15 \ Version 0.3 6 March 2009 { and } replaced with T{ and }T
16 \ 0.2 20 April 2007 ANS Forth words changed to upper case
17 \ 0.1 Oct 2006 First version released
26 \ --------------------------------------------------------------------
27 \ Assumptions and dependencies:
28 \ - the forth system under test throws an exception with throw
29 \ code -13 for a word not found by the text interpreter. The
30 \ undefined word used is $$qweqweqwert$$, if this happens to be
pnp.4th (https://github.com/deathmaker1/kame.git) Forth · 172 lines
version.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 96 lines
beastie.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 110 lines
version.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 60 lines
coreexttest.fth (https://github.com/llasram/zmforth.git) Forth · 247 lines
1 \ To test some of the ANS Forth Core Ext word set, version 0.1
3 \ Copyright (C) Gerry Jackson 2006, 2007
15 \ Version 0.3 6 March 2009 { and } replaced with T{ and }T
16 \ CONVERT test now independent of cell size
17 \ 0.2 20 April 2007 ANS Forth words changed to upper case
18 \ Tests qd3 to qd6 by Reinhold Straub
19 \ 0.1 Oct 2006 First version released
frames.4th (https://github.com/freebsd/freebsd.git) Forth · 156 lines
30 vocabulary frame-drawing
31 only forth also frame-drawing definitions
33 \ XXX Filled boxes are left as an exercise for the reader... ;-/
68 0x2593 constant fill_bright
70 only forth definitions also frame-drawing
72 : hline ( len x y -- ) \ Draw horizontal single line
154 fill_none fill !
156 only forth definitions
beastie.4th (https://github.com/deathmaker1/kame.git) Forth · 208 lines
menuconf.4th (https://github.com/thurday/freebsd.git) Forth · 110 lines
8 60 11 10 4 box
9 29 4 at-xy 15 fg 7 bg
10 ." Welcome to BootFORTH!"
11 me
12 ;
60 10 19 at-xy ." * Choose 3 to proceed with standard bootstrapping."
61 12 20 at-xy ." See '?' for available commands, and 'words' for"
62 12 21 at-xy ." complete list of Forth words."
63 10 22 at-xy ." * Choose 4 in order to warm boot your machine."
64 ;
menu.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 99 lines
2 \ XXX This is far too trivial - I don't have time now to think
3 \ XXX about something more fancy... :-/
4 \ $FreeBSD: head/share/examples/bootforth/menu.4th 50476 1999-08-28 00:22:10Z peter $
6 : title
8 60 11 10 4 box
9 29 4 at-xy 15 fg 7 bg
10 ." Welcome to BootFORTH!"
11 me
12 ;
17 ." 1. Start FreeBSD /kernel."
18 20 8 at-xy
19 ." 2. Interact with BootFORTH."
20 20 9 at-xy
21 ." 3. Reboot."
stringtest.fth (https://github.com/llasram/zmforth.git) Forth · 133 lines
1 \ To test the ANS Forth String word set
3 \ Copyright (C) Gerry Jackson 2006, 2007
14 \ --------------------------------------------------------------------
15 \ Version 0.3 6 March 2009 { and } replaced with T{ and }T
16 \ 0.2 20 April 2007 ANS Forth words changed to upper case
17 \ 0.1 Oct 2006 First version released
menu.4th (https://github.com/blacklion/GEOM-Events.git) Forth · 99 lines
8 60 11 10 4 box
9 29 4 at-xy 15 fg 7 bg
10 ." Welcome to BootFORTH!"
11 me
12 ;
17 ." 1. Start FreeBSD /kernel."
18 20 8 at-xy
19 ." 2. Interact with BootFORTH."
20 20 9 at-xy
21 ." 3. Reboot."
58 10 19 at-xy ." * Choose 2 if you want to use bootloader facilities."
59 12 20 at-xy ." See '?' for available commands, and 'words' for"
60 12 21 at-xy ." complete list of Forth words."
61 10 22 at-xy ." * Choose 3 in order to warm boot your machine."
62 ;
t_corex.fth (https://github.com/philburk/pforth.git) Forth · 334 lines
1 \ @(#) t_corex.fth 98/03/16 1.2
2 \ Test ANS Forth Core Extensions
3 \
4 \ Copyright 1994 3DO, Phil Burk
256 \ Two's complement arithmetic, wraps around modulo wordsize
257 \ Only tested if the Forth system does wrap around, use of conditional
258 \ compilation deliberately avoided
293 \ ----------------------------------------------------------------------------
294 \ .( TESTING number prefixes # $ % and 'c' character input )
295 \ Adapted from the Forth 200X Draft 14.5 document
297 VARIABLE OLD-BASE
bootmenu.4th (https://github.com/sunnysujan/wikireader.git) Forth · 195 lines
delay.4th (https://bitbucket.org/freebsd/freebsd-base.git) Forth · 119 lines
29 vocabulary delay-processing
30 only forth also delay-processing definitions
32 2 constant delay_default \ Default delay (in seconds)
40 variable delay_showdots \ whether continually print dots while waiting
42 only forth definitions also delay-processing
44 : delay_execute ( -- )
117 ;
119 only forth definitions
worldclock.forth (https://github.com/zeroflag/punyforth.git) Forth · 1578 lines
1 \ World Clock App
3 \ Misc Forth Utilities
4 \ Written for PunyForth
26 \ ST7735 65K Color LCD Display Driver for the Adafruit 1.8" SPI LCD
27 \ Only supports landscape mode with LCD connector on right
28 \ Written for PunyForth
29 \ By: Craig A. Lindley
30 \ Last Update: 01/21/2017
163 \ Graphic Functions for the ST7735 65K Color LCD Controller
164 \ Written for PunyForth
165 \ By: Craig A. Lindley
166 \ Last Update: 01/21/2017
224 \ Text Functions for the ST7735 65K Color LCD Controller
225 \ Written for PunyForth
226 \ By: Craig A. Lindley
227 \ Last Update: 01/21/2017
demo_production.fth (https://github.com/philburk/hmsl.git) Forth · 94 lines
1 \ Use PRODUCTIONs to create a random shape and transform it.
2 \
3 \ Productions contain Forth words that can be executed at
4 \ any point in the hierarchy.
5 \
15 OB.PRODUCTION PROD-REVERSE
17 \ Forth functions to use in productions.
18 : DPR.RAND.NOTE ( -- , randomize notes in shape-1 )
19 ." randomize" cr
49 \
50 \ Place functions in productions.
51 \ Any number of Forth words can be added to a production.
52 \ The only limitation is that they must be quick.
53 0 'c dpr.rand.note 'c dpr.rand.duty 0stuff: prod-randomize
bounce.fth (https://github.com/philburk/hmsl.git) Forth · 136 lines
color.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 48 lines
menuconf.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 110 lines
2 \ XXX This is far too trivial - I don't have time now to think
3 \ XXX about something more fancy... :-/
4 \ $FreeBSD: head/share/examples/bootforth/menuconf.4th 65480 2000-09-05 16:30:09Z dcs $
6 : title
8 60 11 10 4 box
9 29 4 at-xy 15 fg 7 bg
10 ." Welcome to BootFORTH!"
11 me
12 ;
60 10 19 at-xy ." * Choose 3 to proceed with standard bootstrapping."
61 12 20 at-xy ." See '?' for available commands, and 'words' for"
62 12 21 at-xy ." complete list of Forth words."
63 10 22 at-xy ." * Choose 4 in order to warm boot your machine."
64 ;
file.fth (https://github.com/AlDanial/cloc.git) Forth · 161 lines
1 \ https://github.com/philburk/pforth/fth/file.fth
2 \ READ-LINE and WRITE-LINE
3 \
4 \ This code is part of pForth.
5 \
6 \ The pForth software code is dedicated to the public domain,
7 \ and any third party may reproduce, distribute and modify
8 \ the pForth software code or any derivative works thereof
9 \ without any compensation or license. The pForth software
54 \ Standard throw code
55 \ See: http://lars.nocrew.org/forth2012/exception.html#table:throw
56 -72 constant THROW_RENAME_FILE
lineedit.fth (https://bitbucket.org/garryl/camelforth.git) Forth · 169 lines
1 \ ****************************************************************************
2 \ CamelForth for the Zilog Z80
3 \ Copyright (c) 1994,1995 Bradford J. Rodriguez
4 \ With contributions by Douglas Beattie Jr., 1998
22 CR .( Loading Line Editor...)
23 \ Fig-Forth style block editor with extra facilities
25 VARIABLE SCR
33 VOCABULARY EDITOR
34 ALSO EDITOR DEFINITIONS ALSO FORTH
36 64 CONSTANT C/L
167 FOR CR DUP 6 .R SPACE DUP BLOCK C/L TYPE 1+ STEP DROP ;
169 FORTH DEFINITIONS PREVIOUS PREVIOUS
frames.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 112 lines
core-ext.fth (https://gitlab.com/Aaeinstein54/linguist) Forth · 136 lines
exmember.fth (https://github.com/philburk/hmsl.git) Forth · 148 lines
10 \ Copyright 1994 3DO, Phil Burk, Larry Polansky, Devid Rosenboom
11 \
12 \ The pForth software code is dedicated to the public domain,
13 \ and any third party may reproduce, distribute and modify
14 \ the pForth software code or any derivative works thereof
15 \ without any compensation or license. The pForth software
16 \ code is provided on an "as is" basis without any warranty
17 \ of any kind, including, without limitation, the implied
27 \ MOD: PLB 6/10/91 Add RPTR
28 \ 00001 PLB 8/3/92 Make RPTR a -4 for S@ and S!
29 \ 941102 RDG port to pforth
30 \ 941108 PLB more porting to pforth. Use ?LITERAL instead os smart literal.
t_file.fth (https://github.com/philburk/pforth.git) Forth · 344 lines
1 \ Test PForth FILE wordset
3 \ To test the ANS File Access word set and extension words
23 \ 0.5 1 April 2012 Tests placed in the public domain.
24 \ 0.4 22 March 2009 { and } replaced with T{ and }T
25 \ 0.3 20 April 2007 ANS Forth words changed to upper case.
26 \ Removed directory test from the filenames.
27 \ 0.2 30 Oct 2006 updated following GForth tests to remove
246 \ ------------------------------------------------------------------------------
247 TESTING REQUIRED REQUIRE INCLUDED
248 \ Tests taken from Forth 2012 RfD
250 T{ 0 S" t_required_helper1.fth" REQUIRED
261 \ ----------------------------------------------------------------------------
262 TESTING two buffers available for S" and/or S\" (Forth 2012)
264 : SSQ12 S" abcd" ; : SSQ13 S" 1234" ;
ob_bind.fth (https://github.com/philburk/hmsl.git) Forth · 368 lines
26 \ 00004 PLB 6/9/92 Use OB_VALID_OBJECT in OB.VALID?
27 \ 00005 PLB 8/3/92 Objects put absolute address on stack.
28 \ 19961106 PLB Port binding to objects passed as local variables to Pforth.
30 ANEW TASK-OB_BIND
109 \ Compile code to execute method for an object. ---------------
110 #HOST_PFORTH [IF]
111 : OB.BIND.CFA ( use_obj_base rel_method_cfa -- , binds method to object )
112 dup ob.check.illegal swap
137 [THEN]
139 #HOST_AMIGA_JFORTH [IF]
140 : OB.BIND.CFA ( use_obj_base rel_method_cfa -- , binds method to object )
141 dup ob.check.illegal swap
utils.fth (https://github.com/philburk/hmsl.git) Forth · 156 lines
efi.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 30 lines
test-forth.fth (https://gitlab.com/wilfred/emacs) Forth · 53 lines
bench.fth (https://github.com/philburk/pforth.git) Forth · 198 lines
1 \ @(#) bench.fth 97/12/10 1.1
2 \ Benchmark Forth
3 \ by Phil Burk
4 \ 11/17/95
5 \
6 \ pForthV9 on Indy, compiled with gcc
7 \ bench1 took 15 seconds
8 \ bench2 took 16 seconds
20 \ seive took .6
21 \
22 \ HForth on Mac Quadra 800, 68040
23 \ bench1 took 1.73 seconds
24 \ bench2 took 6.48 seconds
28 \ sieve took 0.45 seconds
29 \
30 \ pForthV9 on Mac Quadra 800
31 \ bench1 took 40 seconds
32 \ bench2 took 43 seconds
KataDiversion.fth (https://gitlab.com/Aaeinstein54/linguist) Forth · 79 lines
clone.fth (https://github.com/philburk/pforth.git) Forth · 489 lines
1 \ @(#) clone.fth 97/12/10 1.1
2 \ Clone for PForth
3 \
4 \ Create the smallest dictionary required to run an application.
5 \
6 \ Clone decompiles the Forth dictionary starting with the top
7 \ word in the program. It then moves all referenced secondaries
8 \ into a new dictionary.
9 \
10 \ This work was inspired by the CLONE feature that Mike Haas wrote
11 \ for JForth. Mike's CLONE disassembled 68000 machine code then
12 \ reassembled it which is much more difficult.
13 \
highlight.4th (git://pkgs.fedoraproject.org/kate) Forth · 188 lines
efi.4th (https://bitbucket.org/freebsd/freebsd-base.git) Forth · 39 lines
filetest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 232 lines
17 \ 0.5 1 April 2012 Tests placed in the public domain.
18 \ 0.4 22 March 2009 { and } replaced with T{ and }T
19 \ 0.3 20 April 2007 ANS Forth words changed to upper case.
20 \ Removed directory test from the filenames.
21 \ 0.2 30 Oct 2006 updated following GForth tests to remove
194 \ ------------------------------------------------------------------------------
195 TESTING REQUIRED REQUIRE INCLUDED
196 \ Tests taken from Forth 2012 RfD
198 T{ 0
211 \ ------------------------------------------------------------------------------
212 TESTING S\" (Forth 2012 interpretation mode)
214 \ S\" in compilation mode already tested in Core Extension tests
frames.4th (https://github.com/deathmaker1/kame.git) Forth · 90 lines
frames.4th (https://github.com/opnsense/src.git) Forth · 142 lines
30 vocabulary frame-drawing
31 only forth also frame-drawing definitions
33 \ XXX Filled boxes are left as an exercise for the reader... ;-/
68 178 constant fill_bright
70 only forth definitions also frame-drawing
72 : hline ( len x y -- ) \ Draw horizontal single line
140 fill_none fill !
142 only forth definitions
save-input.fth (https://github.com/philburk/pforth.git) Forth · 85 lines
environ.fth (https://bitbucket.org/garryl/camelforth.git) Forth · 52 lines
1 \ ****************************************************************************
2 \ CamelForth for the Zilog Z80
3 \ Copyright (c) 1994,1995 Bradford J. Rodriguez
4 \ With contributions by Douglas Beattie Jr., 1998
22 CR .( Loading environment variables...)
23 \ ANS Forth environment variables for Sprinter CamelForth
25 255 1 ENVVAR /COUNTED-STRING
beastie.4th (https://github.com/billm/pfsense-tools-centipede-slbd.git) Forth · 69 lines
screen.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 36 lines
screen.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 36 lines
file.fth (https://github.com/philburk/pforth.git) Forth · 163 lines
facilitytest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 135 lines
ob_ivars.fth (https://github.com/philburk/hmsl.git) Forth · 162 lines
coreexttest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 816 lines
1 \ To test the ANS Forth Core Extension word set
3 \ This program was written by Gerry Jackson in 2006, with contributions from
17 \ DEFER IS ACTION-OF DEFER! DEFER@ tests added
18 \ Empty CASE statement test added
19 \ [COMPILE] tests removed because it is obsolescent in Forth 2012
20 \ 0.10 1 August 2014
21 \ Added tests contributed by James Bowman for:
31 \ SAVE-INPUT & RESTORE-INPUT tests, position
32 \ of T{ moved so that tests work with ttester.fs
33 \ CONVERT test deleted - obsolete word removed from Forth 200X
34 \ IMMEDIATE VALUEs tested
35 \ RECURSE with :NONAME tested
42 \ 0.3 6 March 2009 { and } replaced with T{ and }T
43 \ CONVERT test now independent of cell size
44 \ 0.2 20 April 2007 ANS Forth words changed to upper case
45 \ Tests qd3 to qd6 by Reinhold Straub
46 \ 0.1 Oct 2006 First version released
history.fth (https://github.com/philburk/pforth.git) Forth · 513 lines
beastie.4th (https://github.com/openzfs/openzfs.git) Forth · 110 lines
29 marker task-beastie.4th
31 only forth definitions
33 variable logoX
65 dup 0= if 2drop else drop then \ getenv result unused
66 loader_color? if
67 s" try-include /boot/forth/logo-orb.4th"
68 else
69 s" try-include /boot/forth/logo-orbbw.4th"
71 else
72 2drop ( c-addr/u -- ) \ getenv result unused
73 s" try-include /boot/forth/logo-${loader_logo}.4th"
74 then
75 evaluate
ctrl_text.fth (https://github.com/philburk/hmsl.git) Forth · 596 lines
termio.fth (https://github.com/philburk/pforth.git) Forth · 98 lines
t_tools.fth (https://github.com/philburk/pforth.git) Forth · 83 lines
errors.fth (https://bitbucket.org/garryl/camelforth.git) Forth · 67 lines
stringtest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 304 lines
1 \ To test the ANS Forth String word set
3 \ This program was written by Gerry Jackson in 2006, with contributions from
16 \ 0.5 29 April 2010 Added tests for SEARCH and COMPARE with
17 \ all strings zero length (suggested by Krishna Myneni).
18 \ SLITERAL test amended in line with comp.lang.forth
19 \ discussion
20 \ 0.4 30 November 2009 <true> and <false> replaced with TRUE
21 \ and FALSE
22 \ 0.3 6 March 2009 { and } replaced with T{ and }T
23 \ 0.2 20 April 2007 ANS Forth words changed to upper case
24 \ 0.1 Oct 2006 First version released
t_corex.fth (https://github.com/createuniverses/praxis.git) Forth · 226 lines
beastie.4th (https://repo.or.cz/dragonfly/vkernel-mp.git) Forth · 257 lines
beastie.4th (https://repo.or.cz/dfdiff.git) Forth · 257 lines
xforms.fth (https://github.com/philburk/hmsl.git) Forth · 297 lines
brand.4th (https://github.com/openzfs/openzfs.git) Forth · 74 lines
misc2.fth (https://github.com/philburk/pforth.git) Forth · 279 lines
screen.4th (https://github.com/deathmaker1/kame.git) Forth · 36 lines
c_struct.fth (https://github.com/philburk/pforth.git) Forth · 250 lines
forget.fth (https://github.com/createuniverses/praxis.git) Forth · 97 lines
7 \ Copyright 1994 3DO, Phil Burk, Larry Polansky, Devid Rosenboom
8 \
9 \ The pForth software code is dedicated to the public domain,
10 \ and any third party may reproduce, distribute and modify
11 \ the pForth software code or any derivative works thereof
12 \ without any compensation or license. The pForth software
13 \ code is provided on an "as is" basis without any warranty
14 \ of any kind, including, without limitation, the implied
walktree.fth (https://github.com/mediogre/colorite.git) Forth · 61 lines
dumpImage.rx (https://github.com/crcx/retro-language.git) Forth · 50 lines
demo_ses.fth (https://github.com/philburk/hmsl.git) Forth · 156 lines
dump_struct.fth (https://github.com/philburk/pforth.git) Forth · 122 lines
9 \ MOD: PLB 9/9/88 Print U/S , add ADST
10 \ MOD: PLB 12/6/90 Modified to work with H4th
11 \ 941109 PLB Converted to pforth. Added RP detection.
12 \ 090609 PLB Convert >rel to use->rel and ..! to s!
31 dup sn-fence @ >
32 WHILE
33 \ dup n>link @ \ JForth
34 dup prevname \ HForth
65 : DUMP.STRUCT ( addr-data addr-structure -- )
66 >newline swap >r ( -- as , save addr-data for dumping )
67 \ dup cell+ @ over + \ JForth
68 dup code> >name swap cell+ @ over + \ HForth
member.fth (https://github.com/philburk/pforth.git) Forth · 164 lines
t_strings.fth (https://github.com/philburk/pforth.git) Forth · 106 lines
obmethod.fth (https://github.com/philburk/hmsl.git) Forth · 272 lines
78 \ It generates a headerless secondary with some object stack manipulations
79 \ at the beginning and end.
80 \ It will have to be hand tweaked for each FORTH because of
81 \ differences in the compilers.
107 METHOD INIT: ( INIT: MUST have method index = 0 !!! )
109 \ This is handy for inside Forth words called from a method.
110 : CURRENT.OBJECT ( -- object )
111 os.copy
foreground.fth (https://github.com/jephthai/EvilVM.git) Forth · 94 lines
searchordertest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 182 lines
27 \ Words tested in this file are:
28 \ FORTH-WORDLIST GET-ORDER SET-ORDER ALSO ONLY FORTH GET-CURRENT
29 \ SET-CURRENT DEFINITIONS PREVIOUS SEARCH-WORDLIST WORDLIST FIND
30 \ Words not fully tested:
76 T{ ALSO GET-ORDER -> GET-ORDERLIST OVER SWAP 1+ }T
77 T{ ONLY FORTH GET-ORDER -> GET-ORDERLIST }T \ See assumptions above
79 \ ------------------------------------------------------------------------------
89 TESTING minimum search order list contains FORTH-WORDLIST and SET-ORDER
91 : SO1 SET-ORDER ; \ In case it is unavailable in the forth wordlist
93 T{ ONLY FORTH-WORDLIST 1 SET-ORDER GET-ORDERLIST SO1 -> }T
require.fth (https://github.com/philburk/pforth.git) Forth · 37 lines
1 \ REQUIRE and REQUIRED
2 \
3 \ This code is part of pForth.
4 \
5 \ Permission to use, copy, modify, and/or distribute this
20 \
21 \ This searches the "::::<filename>" marker created by INCLUDED. This
22 \ works for now, but may break if pForth ever receives wordlists.
23 : INCLUDED? ( c-addr u -- flag )
24 s" ::::" here place ( c-addr u )
misc1.fth (https://github.com/philburk/pforth.git) Forth · 180 lines
cond_comp.fth (https://github.com/philburk/hmsl.git) Forth · 63 lines
dict3.fth (https://github.com/jephthai/EvilVM.git) Forth · 174 lines
filefind.fth (https://github.com/philburk/pforth.git) Forth · 119 lines
1 \ @(#) filefind.fth 98/01/26 1.2
2 \ FILE? ( <name> -- , report which file this Forth word was defined in )
3 \
4 \ FILE? looks for ::::Filename and ;;;; in the dictionary
11 \ 00001 PLB 2/21/92 Handle words from kernel or keyboard.
12 \ Support EACH.FILE?
13 \ 961213 PLB Port to pForth.
15 ANEW TASK-FILEFIND.FTH
t_locals.fth (https://github.com/philburk/pforth.git) Forth · 58 lines
float_port.fth (https://github.com/philburk/hmsl.git) Forth · 63 lines
loadp4th.fth (https://github.com/philburk/pforth.git) Forth · 51 lines
demo_action.fth (https://github.com/philburk/hmsl.git) Forth · 210 lines
history.fth (https://github.com/createuniverses/praxis.git) Forth · 513 lines
savedicd.fth (https://github.com/philburk/pforth.git) Forth · 177 lines
14 \ !!! set to 4 for minimally sized dictionary to prevent DIAB
15 \ compiler from crashing! Allocate more space in pForth.
16 4 constant SDAD_NAMES_EXTRA \ space for additional names
17 4 constant SDAD_CODE_EXTRA \ space for additional names
137 ;
139 : IS.LITTLE.ENDIAN? ( -- flag , is Forth in Little Endian mode? )
140 1 pad !
141 pad c@
145 sdad.open abort" sdad.open failed!"
146 \ Write headers.
147 c" /* This file generated by the Forth command SDAD */" $sdad.line
149 c" HEADERPTR" headers-ptr @ namebase - sdad.define
errorreport.fth (https://github.com/jamesbowman/swapforth.git) Forth · 74 lines
strings.fth (https://github.com/createuniverses/praxis.git) Forth · 97 lines
locals.fth (https://github.com/philburk/pforth.git) Forth · 80 lines
t_floats.fth (https://github.com/cataska/pforth.git) Forth · 134 lines
locals.fth (https://github.com/createuniverses/praxis.git) Forth · 77 lines
6 \ Copyright 1994 3DO, Phil Burk, Larry Polansky, Devid Rosenboom
7 \
8 \ The pForth software code is dedicated to the public domain,
9 \ and any third party may reproduce, distribute and modify
10 \ the pForth software code or any derivative works thereof
11 \ without any compensation or license. The pForth software
12 \ code is provided on an "as is" basis without any warranty
13 \ of any kind, including, without limitation, the implied
40 ascii - OF loc-comment-mode on 2drop ENDOF
41 ascii ) OF ." { ... ) imbalance!" cr abort ENDOF
42 ascii \ OF postpone \ 2drop ENDOF \ Forth comment
44 \ process name
toolstest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 319 lines
1 \ To test some of the ANS Forth Programming Tools and extension wordset
3 \ This program was written by Gerry Jackson in 2006, with contributions from
18 \ 0.5 30 November 2009 <true> and <false> replaced with TRUE and FALSE
19 \ 0.4 6 March 2009 ENDIF changed to THEN. {...} changed to T{...}T
20 \ 0.3 20 April 2007 ANS Forth words changed to upper case
21 \ 0.2 30 Oct 2006 updated following GForth test to avoid
39 \ - tester.fr or ttester.fs has been loaded prior to this file
40 \ - testing TRAVERSE-WORDLIST uses WORDLIST SEARCH-WORDLIST GET-CURRENT
41 \ SET-CURRENT and FORTH-WORDLIST from the Search-order word set
42 \ ------------------------------------------------------------------------------
188 T{ DEF3 -> 4 }T
190 0 [IF] \ { xxx not yet in swapforth
191 \ ------------------------------------------------------------------------------
192 TESTING N>R NR>
t_alloc.fth (https://github.com/philburk/pforth.git) Forth · 116 lines
file_port.fth (https://github.com/philburk/hmsl.git) Forth · 78 lines
savedicd.fth (https://github.com/createuniverses/praxis.git) Forth · 177 lines
14 \ !!! set to 4 for minimally sized dictionary to prevent DIAB
15 \ compiler from crashing! Allocate more space in pForth.
16 4 constant SDAD_NAMES_EXTRA \ space for additional names
17 4 constant SDAD_CODE_EXTRA \ space for additional names
137 ;
139 : IS.LITTLE.ENDIAN? ( -- flag , is Forth in Little Endian mode? )
140 1 pad !
141 pad c@
145 sdad.open abort" sdad.open failed!"
146 \ Write headers.
147 c" /* This file generated by the Forth command SDAD */" $sdad.line
149 c" HEADERPTR" headers-ptr @ namebase - sdad.define