ref: 3b212b65f7af30de9b846da7dab418add0dcabcd
parent: 79b53e4c64a31f4659c0e4f1e281db9a5dbe557a
author: 9ferno <[email protected]>
date: Mon Dec 27 17:47:56 EST 2021
working forth tests
--- a/os/pc64/forth.h
+++ b/os/pc64/forth.h
@@ -520,7 +520,7 @@
{.type Header, {.hdr { 2, "s@", /* M_stackptr = 2144 */ stackptr }}}, /* MENTRY "s@" stackptr 2 ; puts PSP on stack h 2152 */
{.type Header, {.hdr { 5, "Wordb", /* M_Wordb = 2168 */ Wordb }}}, /* MENTRY "Wordb" Wordb 5 h 2176 */
{.type Header, {.hdr { 3, "Tib", /* M_Tib = 2192 */ Tib }}}, /* MENTRY "Tib" Tib 3 h 2200 */
- {.type Header, {.hdr { 3, "Args", /* M_Args = 2216 */ Args }}}, /* MENTRY "Args" Args 3 h 2224 */
+ {.type Header, {.hdr { 4, "Args", /* M_Args = 2216 */ Args }}}, /* MENTRY "Args" Args 4 h 2224 */
{.type Header, {.hdr { 5, "false", /* C_false = 2240 */ colon }}}, /* CENTRY "false" false 5 h 2248 */
{.type FromH0, {.p M_literal}, .src = "dd M_literal"}, /* dd M_literal 2256 */
{.type Absolute, {.p 0}}, /* dd 0 2264 */
--- a/os/pc64/forth.s
+++ b/os/pc64/forth.s
@@ -557,8 +557,9 @@
NEXT
TEXT stackptr(SB), 1, $-4 /* ( -- a ) does not include TOP! */
+ MOVQ PSP, CX
PUSH(TOP)
- MOVQ PSP, TOP
+ MOVQ CX, TOP
NEXT
TEXT lshift(SB), 1, $-4 /* ( n1 n2 -- n1<<n2 ) */
--- a/os/pc64/primitives-nasm.s
+++ b/os/pc64/primitives-nasm.s
@@ -85,4 +85,4 @@
MENTRY "s@" stackptr 2 ; puts PSP on stack
MENTRY "Wordb" Wordb 5
MENTRY "Tib" Tib 3
-MENTRY "Args" Args 3
+MENTRY "Args" Args 4
binary files a/tests/fthtests.sh b/tests/fthtests.sh differ