From defe36f55d3f1c51ae52428592bc791748ad3d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 14 Oct 2019 00:56:39 +0100 Subject: [PATCH] Move the SET section down. It needs hex2 assembler which was not yet available at that point. --- bootstrapping Steps.org | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/bootstrapping Steps.org b/bootstrapping Steps.org index 7c07ef7..a7abb3d 100644 --- a/bootstrapping Steps.org +++ b/bootstrapping Steps.org @@ -62,7 +62,28 @@ If you fail to specify --tape_01 and/or --tape_02, this will produce tape_01 wit stage1_assembler-0 should have the sha256sum of 13b45134a88c1c6db349cb40f82269cee9edfce71ac644dc0e137bad053bf5ce -* Step 2b Lets make a Line text editor +* 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. + +So we are going to limit ourselves to single character labels and pointers (:a and @a respectively) which should be enough to make the next step reasonable. + +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 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. + +Hopefully 64 char labels is enough (if not, simply add more NOPs at the end and fix the 2 table address references [Which will alter the checksum accordingly]) + +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 2c02c50958f489a660a4915d2a9e207a0c61f411d42628bdaf4dcf6bf7149a9d + +* Step 4b 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. So, lets make a line text editor, (it'll be 916 bytes long and require you to type 1,832 characters perfectly to make it) @@ -85,27 +106,6 @@ From this point on I will assume you are going to take the easy route and simply 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. - -So we are going to limit ourselves to single character labels and pointers (:a and @a respectively) which should be enough to make the next step reasonable. - -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 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. - -Hopefully 64 char labels is enough (if not, simply add more NOPs at the end and fix the 2 table address references [Which will alter the checksum accordingly]) - -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 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.