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 ;

104

105 \ The implementation of these pForth primitives is specific to pForth.

106

107 variable TRACE-LOCALS-PTR \ point to top of local frame

RetStkDep.fth (https://github.com/mwilbur/openbios.git) Forth · 105 lines

3 \ in between.

4

5 \ From the ANSI Forth Spec:

6 \ 3.2.3.3 Return stack

7 \ . . . . . .

searchordertest.fth (https://github.com/llasram/zmforth.git) Forth · 187 lines

24

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:

75

76 T{ ALSO GET-ORDER -> get-orderlist OVER SWAP 1+ }T

77 T{ ONLY FORTH GET-ORDER -> get-orderlist }T \ See assumptions above

78

79 \ ------------------------------------------------------------------------------

91 Testing minimum search order list contains FORTH-WORDLIST and SET-ORDER

92

93 : so1 SET-ORDER ; \ In case it is unavailable in the forth wordlist

94

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

59

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)

2

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+ @

39

40 .( Equates )

66 \ IP instruction pointer

67

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

138 sizedefinst if ( creanode @ cr ." Node=" . )

139 save-instdata then \ Save inst data

140 \ forth definitions ( set forth vocabulary as master )

141 ini-instproc makenode \ Create new node

142 creanode @ dup nodehandle ! -> my-self \ store last defined node as current

toolstest.fth (https://github.com/llasram/zmforth.git) Forth · 161 lines

1 \ To test some of the ANS Forth Programming Tools and extension wordset

2

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

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/pnp.4th 186789 2009-01-05 20:09:54Z luigi $

26

27

155 0 value id

156

157 only forth also support-functions

158

159 : (load) load ;

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 ;

84

85 \ The implementation of these pForth primitives is specific to pForth.

86 variable TRACE-LOCALS-PTR \ point to top of local frame

87

pnp.4th (https://github.com/thurday/freebsd.git) Forth · 205 lines

155 0 value id

156

157 only forth also support-functions

158

159 : (load) load ;

tools.4TH (https://gitlab.com/Blueprint-Marketing/linguist) Forth · 133 lines

1 \ -*- forth -*- Copyright 2004, 2013 Lars Brinkhoff

2

3 ( Tools words. )

113 \ ----------------------------------------------------------------------

114

115 ( Forth2012 tools extension words. )

116

117 \ TODO: n>r

check-password.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 179 lines

30

31 vocabulary password-processing

32 only forth also password-processing definitions

33

34 13 constant enter_key \ The decimal ASCII value for Enter key

130 ;

131

132 only forth definitions also password-processing

133

134 : check-password ( -- )

177 ;

178

179 only forth definitions

180

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 $

26

27 include /boot/support.4th

28

29 only forth definitions also support-functions

30

31 \ ***** boot-conf

223 : ignore true ; \ For use in load error commands

224

225 \ Return to strict forth vocabulary

226

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

2

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

29

30 vocabulary frame-drawing

31 only forth also frame-drawing definitions

32

33 \ XXX Filled boxes are left as an exercise for the reader... ;-/

91 [then]

92

93 only forth definitions also frame-drawing

94

95 : hline ( len x y -- ) \ Draw horizontal single line

163 fill_none fill !

164

165 only forth definitions

166

softcore.fr (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 206 lines

144 search> dup >search >search ;

145

146 \ FORTH drops the top of the search stack and pushes FORTH-WORDLIST

147 : forth ( -- )

148 search> drop

149 forth-wordlist >search ;

150

151 \ ONLY sets the search order to a default state

loader.4th (https://github.com/thurday/freebsd.git) Forth · 192 lines

46 \ Prepares to boot as specified by loaded configuration files.

47

48 only forth also support-functions also builtins definitions

49

50 : boot

83 ;

84

85 also forth definitions also builtins

86

87 builtin: boot

88 builtin: boot-conf

89

90 only forth definitions also support-functions

91

92 include /boot/check-password.4th

TAlias.fr (http://frege.googlecode.com/svn/) Forth · 75 lines

68 ++ QName.nice tn g ++ "`"))

69 | otherwise = stio ()

70 changeST Global.{sub <- SubSt.{definitions=reverse other}} -- no more type aliases henceforth

71 foreach agrps checkmutual

72 foreach adeps checkselfref

frames.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 128 lines

1 \ Words implementing frame drawing

2 \ XXX Filled boxes are left as an exercise for the reader... ;-/

3 \ $FreeBSD: head/sys/boot/forth/frames.4th 244048 2012-12-09 15:25:34Z dteske $

4

5 marker task-frames.4th

test.forth (https://gitlab.com/aguai/punyforth) Forth · 240 lines

236 print "OK " test_count ? cr ;

237

238 ' selftest execute print "Punyforth ready" cr

239

240 -tests

check-password.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 170 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/check-password.4th 244158 2012-12-12 17:49:01Z dteske $

26

27 marker task-check-password.4th

asm.fr (https://gitlab.com/Blueprint-Marketing/linguist) Forth · 244 lines

3 \ Assembler for x86.

4

5 \ Adds to FORTH vocabulary: ASSEMBLER CODE ;CODE.

6 \ Creates ASSEMBLER vocabulary with: END-CODE and x86 opcodes.

7

235 : (;code) r> code! ;

236

237 base ! only forth definitions also assembler

238

239 \ Standard assembler entry points.

pcibios.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 47 lines

25 \ $FreeBSD$

26

27 only forth also support-functions also builtins definitions

28

29 \ pci-device-count pci-id

43 ;

44

45 also forth definitions also builtins

46

47 builtin: pci-device-count

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

1 \ More tests on the the ANS Forth Core word set

2

3 \ This program is free software; you can redistribute it and/or

delay.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 112 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/delay.4th 238431 2012-07-14 01:45:35Z dteske $

26

27 marker task-delay.4th

brand.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 91 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/brand.4th 238431 2012-07-14 01:45:35Z dteske $

26

27 marker task-brand.4th

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

27 include /boot/support.4th

28

29 only forth definitions also support-functions

30

31 \ ***** boot-conf

187 : ignore true ; \ For use in load error commands

188

189 \ Return to strict forth vocabulary

190

191 only forth also

fforth_tests.fth (https://github.com/EtchedPixels/FUZIX.git) Forth · 1055 lines

62 \ MAY BE DISTRIBUTED FREELY AS LONG AS THIS COPYRIGHT NOTICE REMAINS.

63 \ VERSION 1.2

64 \ THIS PROGRAM TESTS THE CORE WORDS OF AN ANS FORTH SYSTEM.

65 \ THE PROGRAM ASSUMES A TWO'S COMPLEMENT IMPLEMENTATION WHERE

66 \ THE RANGE OF SIGNED NUMBERS IS -2^(N-1) ... 2^(N-1)-1 AND

tester.fr (https://github.com/llasram/zmforth.git) Forth · 61 lines

8

9 \ 22/1/09 The words { and } have been changed to T{ and }T respectively to

10 \ agree with the Forth 200X file ttester.fs. This avoids clashes with

11 \ locals using { ... } and the FSL use of }

12

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

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/shortcuts.4th 238431 2012-07-14 01:45:35Z dteske $

26

27 \ FICL words intended to be used as shortcuts for carrying out common tasks or

memorytest.fth (https://github.com/llasram/zmforth.git) Forth · 92 lines

1 \ To test the ANS Forth Memory-Allocation word set

2

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

18

exceptiontest.fth (https://github.com/llasram/zmforth.git) Forth · 100 lines

1 \ To test the ANS Forth Exception word set and extension words

2

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

18

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

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: src/sys/boot/forth/pnp.4th,v 1.2 2001/12/11 00:49:34 jhb Exp $

26

27 pnpdevices drop

122 0 value id

123

124 only forth also support-functions

125

126 : (load) load ;

version.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 96 lines

28

29 vocabulary version-processing

30 only forth also version-processing definitions

31

32 variable versionX

40 24 versionY !

41

42 only forth definitions also version-processing

43

44 : print_version ( -- )

94 ;

95

96 only forth definitions

97

beastie.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 110 lines

29 marker task-beastie.4th

30

31 only forth definitions

32

33 variable logoX

108 ;

109

110 only forth definitions

111

version.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 60 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/version.4th 238431 2012-07-14 01:45:35Z dteske $

26

27 marker task-version.4th

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

2

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

29

30 vocabulary frame-drawing

31 only forth also frame-drawing definitions

32

33 \ XXX Filled boxes are left as an exercise for the reader... ;-/

68 0x2593 constant fill_bright

69

70 only forth definitions also frame-drawing

71

72 : hline ( len x y -- ) \ Draw horizontal single line

154 fill_none fill !

155

156 only forth definitions

157

beastie.4th (https://github.com/deathmaker1/kame.git) Forth · 208 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.2 2003/05/31 11:19:11 scottl Exp $

26

27 marker task-beastie.4th

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 $

5

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

2

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

18

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

255

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

259

293 \ ----------------------------------------------------------------------------

294 \ .( TESTING number prefixes # $ % and 'c' character input )

295 \ Adapted from the Forth 200X Draft 14.5 document

296

297 VARIABLE OLD-BASE

bootmenu.4th (https://github.com/sunnysujan/wikireader.git) Forth · 195 lines

92 : display-items ( -- )

93 lcd-cls

94 s" Forth programs" lcd-type

95

96 menu-count @ 0

delay.4th (https://bitbucket.org/freebsd/freebsd-base.git) Forth · 119 lines

28

29 vocabulary delay-processing

30 only forth also delay-processing definitions

31

32 2 constant delay_default \ Default delay (in seconds)

40 variable delay_showdots \ whether continually print dots while waiting

41

42 only forth definitions also delay-processing

43

44 : delay_execute ( -- )

117 ;

118

119 only forth definitions

120

worldclock.forth (https://github.com/zeroflag/punyforth.git) Forth · 1578 lines

1 \ World Clock App

2

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

162

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

223

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

16

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

63 ;

64

65 \ Forth words to support actions -------------------.

66 : EXECUTE.PLAYER ( player -- , execute a player )

67 midi.rtc.time@ 0 rot execute: []

color.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 48 lines

23 \ SUCH DAMAGE.

24 \

25 \ $FreeBSD: head/sys/boot/forth/color.4th 238431 2012-07-14 01:45:35Z dteske $

26

27 marker task-color.4th

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 $

5

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

53

54 \ Standard throw code

55 \ See: http://lars.nocrew.org/forth2012/exception.html#table:throw

56 -72 constant THROW_RENAME_FILE

57

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

21

22 CR .( Loading Line Editor...)

23 \ Fig-Forth style block editor with extra facilities

24

25 VARIABLE SCR

32

33 VOCABULARY EDITOR

34 ALSO EDITOR DEFINITIONS ALSO FORTH

35

36 64 CONSTANT C/L

167 FOR CR DUP 6 .R SPACE DUP BLOCK C/L TYPE 1+ STEP DROP ;

168

169 FORTH DEFINITIONS PREVIOUS PREVIOUS

170

frames.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 112 lines

1 \ Words implementing frame drawing

2 \ XXX Filled boxes are left as an exercise for the reader... ;-/

3 \ $FreeBSD: head/share/examples/bootforth/frames.4th 124676 2004-01-18 15:16:12Z nyan $

4

5 marker task-frames.4th

core-ext.fth (https://gitlab.com/Aaeinstein54/linguist) Forth · 136 lines

1 \ -*- forth -*- Copyright 2004, 2013 Lars Brinkhoff

2

3 \ Kernel: #tib

116 \ ----------------------------------------------------------------------

117

118 ( Forth2012 core extension words. )

119

120 \ TODO: action-of

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

2

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

249

250 T{ 0 S" t_required_helper1.fth" REQUIRED

260

261 \ ----------------------------------------------------------------------------

262 TESTING two buffers available for S" and/or S\" (Forth 2012)

263

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.

29

30 ANEW TASK-OB_BIND

108

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]

138

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

2 \ General Utilities to support JForth & HMSL

3 \ These utilities are useful words which are not likely to be

4 \ supported by a typical Forth. Words which some Forths support

5 \ but some not, should be defined in XXX_BASE.

6 \

efi.4th (https://github.com/FreeBSDonHyper-V/freebsd.git) Forth · 30 lines

25 \ $FreeBSD$

26

27 only forth definitions

28

29 \ Place holder for more functions

test-forth.fth (https://gitlab.com/wilfred/emacs) Forth · 53 lines

1 \

2 \ This is a file that tests Forth tags

3 \

4 \ You should get:

5 \ a-forth-word (twice)

6 \ a-forth-constant!

7 \ a-forth-value?

8 \ :a-forth-dictionary-entry

9 \ #a-defer-word

10 \ (another-forth-word)

11 \ (a-forth-constant

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

1 \ KataDiversion in Forth

2

3 \ -- utils

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

1 (

2

3 Example File for ANS Forth Syntax Highlighting

4

5 6th December 2011 Mark Corbin <mark@dibsco.co.uk>

efi.4th (https://bitbucket.org/freebsd/freebsd-base.git) Forth · 39 lines

25 \ $FreeBSD$

26

27 only forth definitions

28

29 : efiboot? ( -- flag )

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

197

198 T{ 0

210

211 \ ------------------------------------------------------------------------------

212 TESTING S\" (Forth 2012 interpretation mode)

213

214 \ S\" in compilation mode already tested in Core Extension tests

frames.4th (https://github.com/deathmaker1/kame.git) Forth · 90 lines

1 \ Words implementing frame drawing

2 \ XXX Filled boxes are left as an exercise for the reader... ;-/

3 \ $FreeBSD: src/sys/boot/forth/frames.4th,v 1.1 2003/05/30 09:29:23 scottl Exp $

4

5 marker task-frames.4th

frames.4th (https://github.com/opnsense/src.git) Forth · 142 lines

29

30 vocabulary frame-drawing

31 only forth also frame-drawing definitions

32

33 \ XXX Filled boxes are left as an exercise for the reader... ;-/

68 178 constant fill_bright

69

70 only forth definitions also frame-drawing

71

72 : hline ( len x y -- ) \ Draw horizontal single line

140 fill_none fill !

141

142 only forth definitions

143

save-input.fth (https://github.com/philburk/pforth.git) Forth · 85 lines

1 \ SAVE-INPUT and RESTORE-INPUT

2 \

3 \ This code is part of pForth.

4 \

5 \ Permission to use, copy, modify, and/or distribute this

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

21

22 CR .( Loading environment variables...)

23 \ ANS Forth environment variables for Sprinter CamelForth

24

25 255 1 ENVVAR /COUNTED-STRING

beastie.4th (https://github.com/billm/pfsense-tools-centipede-slbd.git) Forth · 69 lines

1 Index: beastie.4th

2 ===================================================================

3 RCS file: /home/ncvs/src/sys/boot/forth/beastie.4th,v

4 retrieving revision 1.12

5 diff -u -r1.12 beastie.4th

screen.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 36 lines

1 \ Screen manipulation related words.

2 \ $FreeBSD: head/sys/boot/forth/screen.4th 115410 2003-05-30 09:29:24Z scottl $

3

4 marker task-screen.4th

screen.4th (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) Forth · 36 lines

1 \ Screen manipulation related words.

2 \ $FreeBSD: head/share/examples/bootforth/screen.4th 50476 1999-08-28 00:22:10Z peter $

3

4 marker task-screen.4th

file.fth (https://github.com/philburk/pforth.git) Forth · 163 lines

1 \ READ-LINE and WRITE-LINE

2 \

3 \ This code is part of pForth.

4 \

5 \ Permission to use, copy, modify, and/or distribute this

55

56 \ Standard throw code

57 \ See: http://lars.nocrew.org/forth2012/exception.html#table:throw

58 -72 constant THROW_RENAME_FILE

59

facilitytest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 135 lines

1 \ To test part of the Forth 2012 Facility word set

2

3 \ This program was written by Gerry Jackson in 2015, with contributions from

ob_ivars.fth (https://github.com/philburk/hmsl.git) Forth · 162 lines

21 \ These should not be called directly.

22

23 \ Make JFORTH compile @ ! etc. inline for speed.

24 #host_amiga_jforth [IF]

52 ;

53

54 #host_amiga_jforth [IF]

55 max-inline !

56 [THEN]

coreexttest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 816 lines

1 \ To test the ANS Forth Core Extension word set

2

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

3 \ Author: Phil Burk

4 \ Copyright 1988 Phil Burk

5 \ Revised 2001 for pForth

6

7 0 [IF]

100

101 : KH.COMPARE ( addr count -- flag , true if redundant )

102 kh.newest.line compare 0= \ note: ANSI COMPARE is different than JForth days

103 ;

104

beastie.4th (https://github.com/openzfs/openzfs.git) Forth · 110 lines

29 marker task-beastie.4th

30

31 only forth definitions

32

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

96 iv.short IV-CG-TEXT-MAX \ maximum number of characters in string

97 iv.short IV-CG-TEXT-JUST \ 0,1,2 for left,center,right justify

98 ob.barray IV-CG-TEXT-BUF \ contains N Forth strings

99

100 :M PUT.CR.FUNCTION: ( cfa -- )

termio.fth (https://github.com/philburk/pforth.git) Forth · 98 lines

10 \ Author: Phil Burk

11 \ Copyright 1988 Phil Burk

12 \ Revised 2001 for pForth

13

14 ANEW TASK-TERMIO.FTH

t_tools.fth (https://github.com/philburk/pforth.git) Forth · 83 lines

1 \ @(#) t_tools.fth 97/12/10 1.1

2 \ Test Tools for pForth

3 \

4 \ Based on testing tools from John Hayes

errors.fth (https://bitbucket.org/garryl/camelforth.git) Forth · 67 lines

1 \ ****************************************************************************

2 \ CamelForth for the Zilog Z80

3 \ Copyright (c) 1994,1995 Bradford J. Rodriguez

4 \ With contributions by Douglas Beattie Jr., 1998

stringtest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 304 lines

1 \ To test the ANS Forth String word set

2

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

25

t_corex.fth (https://github.com/createuniverses/praxis.git) Forth · 226 lines

1 \ @(#) t_corex.fth 98/03/16 1.2

2 \ Test ANS Forth Core Extensions

3 \

4 \ Copyright 1994 3DO, Phil Burk

10 DECIMAL

11

12 \ STUB because missing definition in pForth - FIXME

13 : SAVE-INPUT ;

14 : RESTORE-INPUT -1 ;

beastie.4th (https://repo.or.cz/dragonfly/vkernel-mp.git) Forth · 257 lines

24 \ SUCH DAMAGE.

25 \

26 \ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.7 2003/10/28 17:18:42 scottl Exp $

27 \ $DragonFly: src/sys/boot/forth/beastie.4th,v 1.7 2005/05/30 01:35:00 swildner Exp $

beastie.4th (https://repo.or.cz/dfdiff.git) Forth · 257 lines

24 \ SUCH DAMAGE.

25 \

26 \ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.7 2003/10/28 17:18:42 scottl Exp $

27 \ $DragonFly: src/sys/boot/forth/beastie.4th,v 1.8 2007/08/09 00:28:09 swildner Exp $

xforms.fth (https://github.com/philburk/hmsl.git) Forth · 297 lines

71 \ Develop theme by adding, removing and changing notes. ------

72 \ Played on Pan Flute.

73 \ These Forth words support this motivic development.

74 : COPY.SHAPE { shape1 shape2 -- , copy contents of shape }

75 \ shapes must have same number of dimensions and be newed

brand.4th (https://github.com/openzfs/openzfs.git) Forth · 74 lines

59 s" loader_brand" getenv dup -1 = over 0= or if

60 dup 0= if 2drop else drop then \ getenv result unused

61 s" try-include /boot/forth/brand-illumos.4th"

62 else

63 2drop ( c-addr/u -- ) \ getenv result unused

64 s" try-include /boot/forth/brand-${loader_brand}.4th"

65 then

66 evaluate

misc2.fth (https://github.com/philburk/pforth.git) Forth · 279 lines

1 \ @(#) misc2.fth 98/01/26 1.2

2 \ Utilities for PForth extracted from HMSL

3 \

4 \ Author: Phil Burk

screen.4th (https://github.com/deathmaker1/kame.git) Forth · 36 lines

1 \ Screen manipulation related words.

2 \ $FreeBSD: src/sys/boot/forth/screen.4th,v 1.1 2003/05/30 09:29:23 scottl Exp $

3

4 marker task-screen.4th

c_struct.fth (https://github.com/philburk/pforth.git) Forth · 250 lines

33 \ 00002 PLB 8/3/92 Added S@ and S!, and support for RPTR

34 \ 951112 PLB Added FS@ and FS!

35 \ This version for the pForth system.

36

37 ANEW TASK-C_STRUCT

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

1 \ Walk by device's of tree in BootMon LNM 2000

2 cr ." Device tree parsing"

3 forth definitions decimal anew task-walktree.fth

4 defer workfornode \ Work that must executed on node point

5 ' noop is workfornode

dumpImage.rx (https://github.com/crcx/retro-language.git) Forth · 50 lines

10 needs enum'

11 needs eval'

12 needs forth'

13 needs hash'

14 needs infix'

demo_ses.fth (https://github.com/philburk/hmsl.git) Forth · 156 lines

24 ;

25

26 \ Use ZAP in different ways inside a Forth word.

27 \ Use playnow{ to enter notational system.

28 : ZAPS ( n -- , play zap N times )

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!

13

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

29 \ MOD: PLB 6/10/91 Add RPTR

30 \ 00001 PLB 8/3/92 Make RPTR a -4 for S@ and S!

31 \ 941102 RDG port to pforth

32 \ 941108 PLB more porting to pforth. Use ?LITERAL instead os smart literal.

t_strings.fth (https://github.com/philburk/pforth.git) Forth · 106 lines

1 \ @(#) t_strings.fth 97/12/10 1.1

2 \ Test ANS Forth String Word Set

3 \

4 \ Copyright 1994 3DO, Phil Burk

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.

82

107 METHOD INIT: ( INIT: MUST have method index = 0 !!! )

108

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

69 ;

70

71 \ Now for the Forth-ish UI layer for providing useful foreground application

72 \ words for the EvilVM environment.

73

searchordertest.fth (https://github.com/jamesbowman/swapforth.git) Forth · 182 lines

26

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:

75

76 T{ ALSO GET-ORDER -> GET-ORDERLIST OVER SWAP 1+ }T

77 T{ ONLY FORTH GET-ORDER -> GET-ORDERLIST }T \ See assumptions above

78

79 \ ------------------------------------------------------------------------------

89 TESTING minimum search order list contains FORTH-WORDLIST and SET-ORDER

90

91 : SO1 SET-ORDER ; \ In case it is unavailable in the forth wordlist

92

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

156 ;

157

158 : EVALUATE ( i*x c-addr num -- j*x , evaluate string of Forth )

159 \ save current input state and switch to passed in string

160 source >r >r

cond_comp.fth (https://github.com/philburk/hmsl.git) Forth · 63 lines

2 \

3 \ *********************************************************************

4 \ * HMSL Forth System *

5 \ * Author: Phil Burk *

6 \ * Copyright 1989 Phil Burk , All Rights Reserved *

dict3.fth (https://github.com/jephthai/EvilVM.git) Forth · 174 lines

1 0 !echo

2

3 \ This is an example of building and using a "dictionary" in EvilForth.

4 \ The implementation is via a binary search tree (BST). This is not as

5 \ efficient as a more complex hash table, but does quite well at making

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.

14

15 ANEW TASK-FILEFIND.FTH

t_locals.fth (https://github.com/philburk/pforth.git) Forth · 58 lines

1 \ @(#) t_locals.fth 97/01/28 1.1

2 \ Test PForth LOCAL variables.

3 \

4 \ Copyright 1996 3DO, Phil Burk

float_port.fth (https://github.com/philburk/hmsl.git) Forth · 63 lines

1 \ Floating point words from HMSL redefined using ANSI Forth

2 \

3 \ Author: Phil Burk

loadp4th.fth (https://github.com/philburk/pforth.git) Forth · 51 lines

1 \ @(#) loadp4th.fth 98/01/28 1.3

2 \ Load various files needed by PForth

3 \

4 \ Author: Phil Burk

demo_action.fth (https://github.com/philburk/hmsl.git) Forth · 210 lines

83 ;

84

85 \ Forth words to support actions -------------------.

86 V: DACT-LAST-NOTE ( stores last note )

87 v: DACT-GOING-UP? ( Is this note higher than th last? )

history.fth (https://github.com/createuniverses/praxis.git) Forth · 513 lines

3 \ Author: Phil Burk

4 \ Copyright 1988 Phil Burk

5 \ Revised 2001 for pForth

6

7 0 [IF]

100

101 : KH.COMPARE ( addr count -- flag , true if redundant )

102 kh.newest.line compare 0= \ note: ANSI COMPARE is different than JForth days

103 ;

104

savedicd.fth (https://github.com/philburk/pforth.git) Forth · 177 lines

13

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 ;

138

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

148

149 c" HEADERPTR" headers-ptr @ namebase - sdad.define

errorreport.fth (https://github.com/jamesbowman/swapforth.git) Forth · 74 lines

1 \ To collect and report on the number of errors resulting from running the

2 \ ANS Forth and Forth 2012 test programs

3

4 \ This program was written by Gerry Jackson in 2015, and is in the public

strings.fth (https://github.com/createuniverses/praxis.git) Forth · 97 lines

1 \ @(#) strings.fth 98/01/26 1.2

2 \ String support for PForth

3 \

4 \ Copyright Phil Burk 1994

51 ;

52

53 : TEXT=? ( addr1 count addr2 -- flag , for JForth compatibility )

54 swap text=

55 ;

locals.fth (https://github.com/philburk/pforth.git) Forth · 80 lines

43 ascii - OF loc-comment-mode on 2drop ENDOF

44 ascii ) OF ." { ... ) imbalance!" cr abort ENDOF

45 ascii \ OF postpone \ 2drop ENDOF \ Forth comment

46

47 \ process name

t_floats.fth (https://github.com/cataska/pforth.git) Forth · 134 lines

1 \ @(#) t_floats.fth 98/02/26 1.1 17:46:04

2 \ Test ANS Forth FLOAT words.

3 \

4 \ Copyright 1994 3DO, Phil Burk

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

43

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

2

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 \ ------------------------------------------------------------------------------

43

188 T{ DEF3 -> 4 }T

189

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

1 \ @(#) t_alloc.fth 97/01/28 1.4

2 \ Test PForth ALLOCATE

3 \

4 \ Copyright 1994 3DO, Phil Burk

file_port.fth (https://github.com/philburk/hmsl.git) Forth · 78 lines

1 \ Add HMSL File access words to pForth.

2 \ Define them in terms of the ANSI file words.

3 \

savedicd.fth (https://github.com/createuniverses/praxis.git) Forth · 177 lines

13

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 ;

138

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

148

149 c" HEADERPTR" headers-ptr @ namebase - sdad.define