Updated boostrapping steps to match current pieces

This commit is contained in:
Jeremiah Orians 2018-03-21 09:38:38 -04:00
parent b43821afd4
commit 56bf53390c
No known key found for this signature in database
GPG Key ID: 7457821534D2ACCD
1 changed files with 11 additions and 11 deletions

View File

@ -37,7 +37,7 @@ gcc Linux\ Bootstrap/hex.c -o bin/hex
Then we can use it to make our bootstrap binary:
./bin/hex < stage0/stage0_monitor.hex0 > roms/stage0_monitor
Which should have the sha256sum of 0a427b14020354d1c785f5f900677e0059fce8f8d4456e9c19e5528cb17101eb
Which should have the sha256sum of 23929c57f41414f57583457d0500f22b5b1c80f39c79522e23c8b13e5afb191d
* Step 2 create a hex assembler
Now that we have a Hex monitor, we are now capable of either creating a text file (no ability to correct mistakes along the way) or any arbitrary hex program we want.
@ -60,7 +60,7 @@ or
If you fail to specificy --tape_01 and/or --tape_02, this will produce tape_01 with the resulting binary and tape_02 with the source code input
(this is really important for bootstrapping a text editor)
stage1_assembler-0 should have the sha256sum of 3ea7fed1429400c1d6fc5b85180c4114755dfb1e6b88d69e7ecc465a40523bc8
stage1_assembler-0 should have the sha256sum of 13b45134a88c1c6db349cb40f82269cee9edfce71ac644dc0e137bad053bf5ce
* Step 2b Lets make a Line text editor
Now I don't know about you but I suck at not making mistakes and having to fix a whole line instead of an entire file is a hell of an improvement.
@ -75,15 +75,15 @@ You can build this file 2 ways:
or
2) Manually type in the contents of stage1/SET.hex0 (Minus the comments of course) while running:
2) Manually type in the contents of stage1/SET.hex2 (Minus the comments of course) while running:
./bin/vm --rom roms/stage0_monitor --tape_01 /dev/null --tape_02 temp
Then you can compile the text file with the stage1_assembler-0 that we already made.
Then you can compile the text file with the stage1_assembler-2 that we already made.
From this point on I will assume you are going to take the easy route and simply load the source code using some mechanism you trust or are using SET to manually duplicate the entries of the code files used in each of the proceeding steps.
SET should have the SHA256SUM of 24a4d74eb2eb7a82e68335643855658b27b5a6c3b13db473539f3e08d6f26ceb
SET should have the SHA256SUM of 059d38e34275029f2de5f600f08fe01bd13cd173f7da58e3fbec7114074beff2
* Step 3 create a better hex assembler
Now that it is easy(ish) to create text files and we have a really stupid hex assembler, we probably don't want to manually calculate offsets and jumps any more.
@ -93,7 +93,7 @@ So we are going to limit ourselves to single character labels and pointers (:a a
To build our improved hex assembler:
./bin/vm --rom roms/stage1_assembler-0 --tape_01 stage1/stage1_assembler-1.hex0 --tape_02 roms/stage1_assembler-1
roms/stage1_assembler-1 should have the sha256sum of b6aabcc3418a0a28f4ed32ace43b20103d9d21dffae03e7936cb14fa0e044013
roms/stage1_assembler-1 should have the sha256sum of 156f555fce5b02f52445652b1ed0b443295706cdfbe23c5a021bd4efc77179bb
* Step 4 get even long label support
Now that we have labels and pointers, I want the ability to have labels like :main_function and :stack_start and be able to reference the absolute address of things in my code like $stack_start and complex objects that have 32bit pointers like &foo_bar.
@ -104,7 +104,7 @@ To build our last and greatest Hex assembler:
./bin/vm --rom roms/stage1_assembler-1 --tape_01 stage1/stage1_assembler-2.hex1 --tape_02 roms/stage1_assembler-2
Now tape_02 contains the last hex assembler we will need
roms/stage1_assembler-2 should have the sha256sum of 7b02babee42a3c05b001fb44fb0917383d8f185e2817d57ad2349a4b36dfa4ed
roms/stage1_assembler-2 should have the sha256sum of 2c02c50958f489a660a4915d2a9e207a0c61f411d42628bdaf4dcf6bf7149a9d
* Step 5 Lets get us a line macro assembler
I don't know about you but at this point, I don't wanna convert another instruction into HEX by hand, so to save myself the pain we are going to write the most often ignored but important development in computer programming. The LINE MACRO ASSEMBLER.
@ -116,7 +116,7 @@ To build our line macro assembler:
Now with our new line macro assembler, which with our definition file High_level_prototypes/defs means we can write straight assembly from here on out.
roms/M0 should have the sha256sum of 47bc5a29e37bbe4cac31ba612f5e452210b0c4364e529116b9a1c4976912c29d
roms/M0 should have the sha256sum of 3020b194ead31ae19ba66fc35ed95465514373f6005896350d1608c9efabbdca
* Step 5b Saving a bunch of duplicate work
Assuming that you have been doing all of the above the hard way on physical hardware with real paper tapes, this step is for you.
@ -134,7 +134,7 @@ To Build our first pass is:
To finish our build our last pass is:
./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/CAT --memory 48K
roms/CAT should have the sha256sum of 8f465d3ec1cba00a7d024a1964e74bb6d241f86a73c77d95d8ceb10d09c8f7b9
roms/CAT should have the sha256sum of 695698ebc7ed1d3acbcded1bd832a6b49b9a7c2a37c216a9fccdc0e89e976e99
And now you have the ability to simply feed tape_01 with tapes in any order you desire and the combination of all those tapes will be in tape_02.
This also of course could be used for tape duplication if you are noticing wear on any of your tapes.
@ -152,7 +152,7 @@ Then we use our M0 Line macro assembler to convert our assembly into hex2 format
Then we need to assemble that hex into our desired program:
./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/lisp --memory 48K
roms/lisp should have the sha256sum of 7c3887f791999aa9c1b8415d8e5be93afcf916b505296d9da7bd7a22531a84b5
roms/lisp should have the sha256sum of 2b80849180d5fb3757bcca2471b6337808e5b5ca80b18d93fa82ddef0435b84b
Our lisp will first attempt to evaluate any code in tape_01 and then evaluate any code that the user types in.
It is recommended to run with no less than 4MB of Memory
@ -174,7 +174,7 @@ Then we use our M0 Line macro assembler to convert our assembly into hex2 format
Then we need to assemble that hex into our desired program:
./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/forth --memory 48K
roms/forth should with the sha256sum of b3a910f18c6bc0ef4aa7a53cb3f0216a9f143319da67ed2a02210fe88b1e1131
roms/forth should with the sha256sum of f4bbf9e9c4828170d0c153ac265382dc705643f95efd2a029243326d426be5a4
Our forth will first attempt to evaluate any code in tape_01 and then evaluate any code that the user types in
(Otherwise there is no way for a forth fan to have a chance against the lisp in terms of being able to bootstrap something cool)