From 7fd82b8b673a8bc519e1df3a15b754fb8edb43f3 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Sat, 19 Nov 2016 12:41:34 -0500 Subject: [PATCH] Enhanced forth memory space layout --- CHANGELOG.org | 2 ++ stage2/forth.s | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 0190daf..fb58e16 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -2,6 +2,8 @@ ** Added ** Changed ** Fixed +Fixed arrangement of spaces in forth to prevent the small input space bug + ** Removed * 0.0.2 - 2016-11-01 diff --git a/stage2/forth.s b/stage2/forth.s index d547566..69b33ad 100644 --- a/stage2/forth.s +++ b/stage2/forth.s @@ -1,7 +1,8 @@ ;; Memory Space ;; 0 -> 1MB code -> Heap space [Heap pointer with malloc function] - ;; 1MB -> 1.5MB Stack space 1 (Value Stack) [Pointed at by R14] - ;; 1.5MB+ Stack space 2 (Return Stack) [Pointed at by R15] + ;; 1MB -> 1.25MB Stack space 1 (Return Stack) [Pointed at by R15] + ;; 1.25MB -> 1.5MB Stack space 2 (Value Stack) [Pointed at by R14] + ;; 1.5MB+ String Space ;; ;; DICTIONARY ENTRY (HEADER) ;; 0 -> Link (pointer to previous) @@ -51,10 +52,10 @@ :RETURN_BASE '00040000' -:STRING_BASE +:PARAMETER_BASE '00050000' -:PARAMETER_BASE +:STRING_BASE '00060000' ;; The last function you'll ever need to run