Commit Graph

148 Commits

Author SHA1 Message Date
Jeremiah Orians 3309e6325e
Correcting the behavior of R@ 2017-09-16 07:41:22 -04:00
Jeremiah Orians c06faa77e0
Release 0.0.9 2017-08-18 12:02:02 -04:00
Jeremiah Orians 9be2763c40
Incorporated number? and symbol? into stage2 lisp 2017-08-18 11:41:21 -04:00
Jeremiah Orians 1926a9d6b7
Added list->string primitive to stage2 lisp 2017-08-18 11:15:59 -04:00
Jeremiah Orians f835312b3c
Fixing documentation for initial malloc pointer. Tempted to make CONS
array be malloc'd to simplify the address space
2017-08-18 08:32:58 -04:00
Jeremiah Orians 437bfe90b7
Removed unrequired primitive 2017-07-30 21:54:27 -04:00
Jeremiah Orians 21e06a6dfa
Bunch of renames and 1 new internal function for future use 2017-07-30 21:14:25 -04:00
Jeremiah Orians 51c7c98a05
Adding string? primitive to stage2 lisp 2017-07-30 21:01:09 -04:00
Jeremiah Orians 157bec9609
Added char? primitive to stage2 lisp 2017-07-30 20:53:23 -04:00
Jeremiah Orians ef68ad2d3b
Added string->list to stage2 lisp 2017-07-30 20:38:56 -04:00
Jeremiah Orians 7619d6c779
Added char->integer and integer->char 2017-07-30 18:42:36 -04:00
Jeremiah Orians f3f8ec5a32
Implemented basic raw string support in stage2 lisp, many more
enhancements required to make it fully useful
2017-07-30 18:04:29 -04:00
Jeremiah Orians 5b302ba9d0
Actually write to the desired output 2017-07-13 22:01:25 -04:00
Jeremiah Orians 59393b4985
Missed int64_t 2017-07-13 20:08:19 -04:00
Jeremiah Orians 23b12e0ef9
Fixed lisp's behavior when there is insufficient memory 2017-06-24 11:49:28 -04:00
Jeremiah Orians 4963fcfebc
Implemented graceful FAILURE and PRINT 2017-06-24 10:06:50 -04:00
Jeremiah Orians a51c243088
Implementing LSHIFT and RSHIFT per request 2017-06-24 08:49:08 -04:00
Jeremiah Orians 37b061defc
Ensure changelog, checksums and whitespacing rules are updated and enforced 2017-06-24 08:14:31 -04:00
Caleb Ristvedt 1a6c7d5afe
Fix CREATE, implement DOES>, more words
Implemented some new words in forth.s:
* 'DODOES
  Gives the address of the assembly for DODOES. Used by DOES> when compiling
  machine code to jump to it and activate the following high-level forth
  code. This is how non-primitive actions for a word can be set.
* LATEST!
  Sets the LATEST pointer. For when the user wants to write their own way of
  extending the dictionary (word lists, vocabularies, etc).
* R@
  Copies the top of the return stack to the data stack. Useful for when loops
  start getting non-trivial and you start wondering of all those ROTs aren't
  efficient enough. Maybe someday we'll implement a register-allocating
  compiler. Probably not. Too complicated for bootstrapping.
* Not really words but used: DODOES and DOVAR.
  DOVAR is the default behavior of CREATEd words - it just pushes a pointer to
  whatever was allotted right after the word was created. DODOES is jumped to in
  order to invoke high-level forth behaviors for words.
* Changed behavior of CREATE to better match the way it usually works.

Added some words to inital_library.fs (we should fix that name sometime):
* Added a variable BASE to control what base numbers are printed in.
* Turns out I misunderstood what WORD did and mis-diagnosed an early problem in
  ' - so it turns out that nothing was being allotted in the dictionary, just
  stuff in "string space", which if I understand properly just sort of fills up
  infinitely as long as WORD is being invoked. Some other forths try to solve
  this by introducing an input buffer for the current line, at the cost of some
  complexity (as words like [CHAR] and S" have to take that into
  account). Anyway, the HERE and DP! are gone from ' now.
* Added BOUNDS for common setup for sequence-iterating loops.
* Added region-comment "(" (note that it doesn't nest), used most often for
  stack comments.
* Added hex dump printer DUMP and support words, number of bytes printed per
  line is controlled by LINE-SIZE. It looks pretty nice, much of the design is
  based off of gforth's.
* Added DOES> and supporting words, and used it to make VARIABLE, CONSTANT, and
  DEFER.
* Added TUCK, MIN, SPACES, :NONAME, FILL, and <>.

Add LSHIFT and RSHIFT to the wishlist, as ghetto shifting with division seems to
behave a bit strangely when given negative values.

Also, we're now advanced enough to support the tictactoe I wrote awhile back for
gforth! http://paste.lisp.org/display/349394
2017-06-24 07:40:22 -04:00
Jeremiah Orians 800c867085
Altered EXECUTE into indirection 2017-06-17 22:27:15 -04:00
Jeremiah Orians 3b05f83e6a
Fixed the Carriage return issue and CMOVE zeroing issue 2017-06-17 22:05:33 -04:00
Jeremiah Orians b3eedb60de
Refining FORTH to enable more productive development 2017-06-17 00:02:33 -04:00
Jeremiah Orians 97a145ac1f
Enabled support for HIDDEN Flag 2017-06-16 18:08:33 -04:00
Jeremiah Orians c43171c7d2
Added requested ABORT function to forth 2017-06-16 17:43:57 -04:00
Jeremiah Orians 8b0384b370
Added an EXECUTE command primitive to stage2 forth 2017-06-16 16:36:03 -04:00
Jeremiah Orians 77795c669c
Fixed Forth's Stack Leak 2017-06-16 16:19:45 -04:00
Jeremiah Orians 9e2d807553
Fixed the arithmetic order issue found by reepca 2017-06-15 16:36:05 -04:00
Jeremiah Orians 41d3ebb643
Fixing forth comparisons thanks to reepca 2017-06-15 06:33:45 -04:00
Jeremiah Orians 54f4019767
Incorporated requested function into stage2 forth 2017-06-14 23:07:50 -04:00
Jeremiah Orians 2a12799d82
Fixings remaining stack offset bugs 2017-06-14 21:25:41 -04:00
Jeremiah Orians 02b2d231a6
Bug fix thanks to reepca 2017-06-14 21:13:52 -04:00
Jeremiah Orians a37d738138
Wrapup work following new function implementation 2017-05-30 23:02:04 -04:00
Jeremiah Orians 31a9a10d8d
Added essential string comparison primitive. 2017-05-30 22:51:12 -04:00
Jeremiah Orians f28b86d697
Implemented NULL? into stage2 lisp and adjusted accordingly 2017-05-29 22:36:22 -04:00
Jeremiah Orians 9bf8255849
Fixing assoc in mixed lexical scope 2017-05-21 21:13:04 -04:00
Jeremiah Orians c800c14988
Import High Level improvement for stage2 lisp 2017-05-20 14:01:46 -04:00
Jeremiah Orians 5f78bfdf0b
Fixed Let Expressions 2017-05-20 13:49:19 -04:00
Jeremiah Orians a8360e1b4f
Converted stage2 lisp to Lexical scope and added Let expressions 2017-05-14 12:25:34 -04:00
Jeremiah Orians fd70c64f07
Enhanced High Level Lisp prototype with Lexical scope and Let Expressions 2017-05-14 12:21:31 -04:00
Jeremiah Orians 0520fcb23c
Compacting garbage collected lisp rollup 2017-05-06 21:44:05 -04:00
Jeremiah Orians 1b3e5ca5c6
Finished implementing Cell compaction and basic regression
testing (moderate performance improvement)
2017-05-06 21:34:47 -04:00
Jeremiah Orians f7810bbf80
Order Free Cells from Lowest to highest address (minor performance boost) 2017-05-06 12:40:25 -04:00
Jeremiah Orians 8534be74a5
Made minimium changes required to only mark/sweep the cells that have
been allocated. (small speedup)
2017-05-06 10:28:06 -04:00
Jeremiah Orians adaa132b63
Incorporated write command from High Level Lisp into assembly lisp. Now we can use it as a compiler too 2017-04-08 23:26:30 -04:00
Jeremiah Orians fc6b86468b
Enhanced stage2 lisp High level prototype to include line comments and write command 2017-04-08 22:49:04 -04:00
Jeremiah Orians 87477db7eb
Added requested Copyright notices 2017-04-01 17:26:44 -04:00
Jeremiah Orians f7369d7a1e
Finishing up license header compliance 2017-04-01 16:57:20 -04:00
Jeremiah Orians 5f6c7f82bc
Added license to all source files 2017-03-28 20:25:39 -04:00
Jeremiah Orians 8727b3fb1c
Correct for the fact you will run out of stack space before you run out of CONS Cells in only 2MB of ram 2017-02-18 15:45:10 -05:00
Jeremiah Orians ec8695a4fc
Prevent accidential of binary, test or debug files 2017-02-18 15:21:45 -05:00