Commit Graph

372 Commits

Author SHA1 Message Date
Jeremiah Orians ec47252222
Accidentally forgot to update the checksums 2017-07-30 21:56:11 -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 efa8689570
Update changelog and add missing copyright notice 2017-07-13 21:16:41 -04:00
Jeremiah Orians 228c8b20e2
Function to help beginners 2017-07-13 20:51:57 -04:00
Jeremiah Orians 59393b4985
Missed int64_t 2017-07-13 20:08:19 -04:00
Jeremiah Orians e113458a62
Made JUMP-TO use 32bit absolute addresses 2017-07-13 18:24:26 -04:00
Jeremiah Orians 24c1db3ec3
Improved M0 and hex2 notes 2017-07-12 21:11:14 -04:00
Jeremiah Orians 69a77610cf
Minor Forth Tweak 2017-07-12 21:07:53 -04:00
Jeremiah Orians 23b12e0ef9
Fixed lisp's behavior when there is insufficient memory 2017-06-24 11:49:28 -04:00
Jeremiah Orians d3bed26e0a
Correcting error in string output and avoiding segment faults in vm 2017-06-24 11:44:41 -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 871f8e281d
Added changelog notes to reflect reepa's improvements 2017-06-21 06:14:17 -04:00
Caleb Ristvedt c159b6a927
Refactor, fix bugs, and reword comments in initial_library.fs
Some of the comments seemed a bit off. Additionally, there was a bug in AGAIN
in which it didn't actually compile a jump. Also, WHILE's compile-time stack
effect is now consistent with gforth, which means we can have multi-exit while
loops. Also, added UNTIL. Also, added [CHAR] so we don't have to keep looking up
ascii values for characters. Also, whichever bug it was that caused problems
with splitting definitions up across multiple lines is now gone, so long live
the newlines!
2017-06-21 05:47:43 -04:00
Jeremiah Orians b974bec307
Prepare for next release 2017-06-17 23:04:49 -04:00
Jeremiah Orians db2bc37f1d
Release 0.0.8 2017-06-17 22:51:28 -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 1e28eadc7a
Preparing the our next release with our first stage3 program 2017-06-16 23:02:58 -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 6c1c1cf0e3
Modified webIDE to use new and improved disassembler output 2017-06-16 15:12:40 -04:00
Jeremiah Orians a03da9d8b1
Enhanced disassembler to trace reported forth bug 2017-06-16 14:52:23 -04:00
Jeremiah Orians 2af3d78744
Prepend address to disassembler output to enable easier debugging 2017-06-16 14:33:46 -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 37fc186cbc
Preventing segment faults from occuring due to missing input files 2017-06-14 21:56:37 -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 fefe1ddbe2
Removed questions about High level prototype build process 2017-06-03 22:51:13 -04:00
Jeremiah Orians 086e299269
Preparing for next release cycle 2017-06-03 21:46:48 -04:00
Jeremiah Orians dab2088ad0
Make makefile parallel safe, run make development -j $(nproc) for
optimal performance
2017-06-03 21:35:47 -04:00
Jeremiah Orians 2882db4338
Incorporated DEHEX rom into build process 2017-06-03 20:48:38 -04:00
Jeremiah Orians ba9bb0ba29
Fixed formatting and added function to makefile 2017-06-03 12:34:28 -04:00
Jeremiah Orians 9f14c28646
Fixed regression but unsure of cause 2017-06-03 12:32:01 -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