mirror of
https://gitlab.cs.washington.edu/fidelp/frustration.git
synced 2024-12-25 21:58:11 +01:00
Table of contents
This commit is contained in:
parent
5b79671b2c
commit
7fd742f0b1
1 changed files with 23 additions and 4 deletions
|
@ -46,9 +46,20 @@ use std::convert::TryInto;
|
|||
* But before we can do any of that we will need a machine. Let's make one.
|
||||
*/
|
||||
|
||||
/* Table of Contents
|
||||
* Part 1 - The Computer
|
||||
* Part 1a - The instruction set
|
||||
|
||||
* Part 2 - The Program
|
||||
* Part 2a - The lexer
|
||||
* Part 2b - The outer interpreter
|
||||
|
||||
* Part 3 - Using the interactive programming environment
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Part 1 - The Computer
|
||||
* ------------------------------------------------------------------------ */
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* This computer will have a 16-bit CPU. It will be able to access
|
||||
* 2^16 (65536) memory locations, numbered 0 to 65535.
|
||||
|
@ -187,6 +198,10 @@ fn new_core() -> Core {
|
|||
return c;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Part 1a - The instruction set
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Now we have a CPU sitting there but it does nothing.
|
||||
*
|
||||
* A working CPU would execute a list of instructions. An instruction is
|
||||
|
@ -640,7 +655,7 @@ const PRIMITIVES: [Primitive; 16] = [
|
|||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Part 2 - The Program
|
||||
* ------------------------------------------------------------------------ */
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* You now have an unfamiliar computer with no software. Can you and the
|
||||
* computer write a program?
|
||||
|
@ -1205,7 +1220,7 @@ fn build_dictionary(c: &mut Core) {
|
|||
*/
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* Part 2a. The lexer
|
||||
* Part 2a - The lexer
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
/* Now that we've got some basics in place let's go back to solving
|
||||
|
@ -1767,7 +1782,7 @@ fn build_dictionary(c: &mut Core) {
|
|||
forth!(word, find, RET);
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* Part 2b. The outer interpreter
|
||||
* Part 2b - The outer interpreter
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
/* We can now look up a subroutine in the dictionary by typing its name
|
||||
|
@ -2192,6 +2207,10 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Part 3 - Using the interactive programming environment
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* "The next step is a problem-oriented-language. By permitting
|
||||
* the program to dynamically modify its control language, we
|
||||
* mark a qualitative change in capability. We also change our
|
||||
|
|
Loading…
Reference in a new issue