From 5b302ba9d0b6610af5efa7963a5a5c97605008c1 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Thu, 13 Jul 2017 22:01:25 -0400 Subject: [PATCH] Actually write to the desired output --- CHANGELOG.org | 1 + bootstrapping Steps.org | 2 +- stage2/forth.s | 1 + test/SHA256SUMS | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index af8589d..54ddcef 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -49,6 +49,7 @@ Updated checksums to reflect changes in stage2 FORTH Fixed dis behavior in regards to hex values in strings Updated checksums to reflect changes in stage2 Lisp Added missing library reference form stage2 lisp High level prototype +Fixed bug in stage2 FORTH PRINT function ** Removed the HERE and DP! are gone from ' now in stage3 FORTH diff --git a/bootstrapping Steps.org b/bootstrapping Steps.org index 9968eaf..c3e5390 100644 --- a/bootstrapping Steps.org +++ b/bootstrapping Steps.org @@ -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 3a4a15691297345ac808ce41fae26d5592cd09d759d2feef88c1ef262ddaa5b8 +roms/forth should with the sha256sum of d7967248be71937d4fa1f38319a5a8473a842b1f6806b977e5fb184565bde0a4 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) diff --git a/stage2/forth.s b/stage2/forth.s index b4ec809..50f8d28 100644 --- a/stage2/forth.s +++ b/stage2/forth.s @@ -1138,6 +1138,7 @@ &PRINT_Code ; Where assembly is Stored :PRINT_Code POPR R2 R14 ; Load pointer to string + COPY R1 R7 ; Write to standard out CALLI R15 @PRINT_Direct ; Trick to allow direct calls JSR_COROUTINE R11 ; NEXT diff --git a/test/SHA256SUMS b/test/SHA256SUMS index 40cb244..352225c 100644 --- a/test/SHA256SUMS +++ b/test/SHA256SUMS @@ -1,6 +1,6 @@ 8f465d3ec1cba00a7d024a1964e74bb6d241f86a73c77d95d8ceb10d09c8f7b9 roms/CAT 59f0502748af32e3096e026a95e77216179cccfe803a05803317414643e2fcec roms/DEHEX -3a4a15691297345ac808ce41fae26d5592cd09d759d2feef88c1ef262ddaa5b8 roms/forth +d7967248be71937d4fa1f38319a5a8473a842b1f6806b977e5fb184565bde0a4 roms/forth b386b0e08250421a4d7eb14817b4c3359aef52d7773b3667bb1caaa933cbfe66 roms/lisp 2b9727381aec15a504c0898189fbc2344209d8e04451e3fa5d743e08e38f64cf roms/M0 24a4d74eb2eb7a82e68335643855658b27b5a6c3b13db473539f3e08d6f26ceb roms/SET