ref: 77a30a96508354db006f70ba2d3cee74fa49259c
parent: abb4ed071d8c4ae2cd77b1f54ea39f8d8ddc73a9
author: 9ferno <[email protected]>
date: Sun Jan 16 03:59:44 EST 2022
working forth tests
--- a/os/pc64/forth.h
+++ b/os/pc64/forth.h
@@ -991,7 +991,7 @@
{.type FromH0, {.p M_Dp}, .src = "dd M_Dp"}, /* dd M_Dp 6840 */
{.type FromH0, {.p C_plusstore}, .src = "dd C_plusstore"}, /* dd C_plusstore 6848 */
{.type FromH0, {.p M_exitcolon}, .src = "dd M_exitcolon"}, /* dd M_exitcolon 6856 */
- {.type Header, {.hdr { 5, "vallot", /* C_vallot = 6872 */ colon }}}, /* CENTRY "vallot" vallot 5 ; allot on the variable space ( n -- ) vhere = vhere+n h 6880 */
+ {.type Header, {.hdr { 6, "vallot", /* C_vallot = 6872 */ colon }}}, /* CENTRY "vallot" vallot 6 ; allot on the variable space ( n -- ) vhere = vhere+n h 6880 */
{.type FromH0, {.p M_Vp}, .src = "dd M_Vp"}, /* dd M_Vp 6888 */
{.type FromH0, {.p C_plusstore}, .src = "dd C_plusstore"}, /* dd C_plusstore 6896 */
{.type FromH0, {.p M_exitcolon}, .src = "dd M_exitcolon"}, /* dd M_exitcolon 6904 */
--- a/os/pc64/words-nasm.s
+++ b/os/pc64/words-nasm.s
@@ -491,7 +491,7 @@
dd M_Dp
dd C_plusstore
dd M_exitcolon
-CENTRY "vallot" C_vallot 5 ; allot on the variable space ( n -- ) vhere = vhere+n
+CENTRY "vallot" C_vallot 6 ; allot on the variable space ( n -- ) vhere = vhere+n
dd M_Vp
dd C_plusstore
dd M_exitcolon
--- a/os/port/devshm.c
+++ b/os/port/devshm.c
@@ -368,8 +368,8 @@
c->offset = 0;
c->mode = omode;
c->flag |= COPEN;
-print("devshm: created c->type %d devtab[c->type]->dc %c chanpath(c) %s c->qid.path 0x%ux c->qid.type 0x%ux\n",
- c->type, devtab[c->type]->dc, chanpath(c), c->qid.path, c->qid.type);
+ DBG("devshm: created c->type %d devtab[c->type]->dc %c chanpath(c) %s c->qid.path 0x%ux c->qid.type 0x%ux\n",
+ c->type, devtab[c->type]->dc, chanpath(c), c->qid.path, c->qid.type);
return;
}
@@ -383,6 +383,8 @@
Svalue *v;
u64 offset = off;
+ DBG("devshm: read chanpath(c) %s c->qid.path 0x%ux n %d off %d c->aux 0x%p a[0] %c\n",
+ chanpath(c), c->qid.path, n, off, c->aux, ((char*)a)[0]);
if(up->shm == nil)
error(Enonexist);
@@ -404,6 +406,7 @@
c->qid.vers = v->vers;
runlock(v);
+ DBG("devshm: read n %d a[0] %c\n", n, ((char*)a)[0]);
return n;
}
@@ -415,6 +418,8 @@
Svalue *v;
u64 offset = off;
+ DBG("devshm: write chanpath(c) %s c->qid.path 0x%ux n %d off %d c->aux 0x%p a[0] %c\n",
+ chanpath(c), c->qid.path, n, off, c->aux, ((char*)a)[0]);
if(n <= 0)
return 0;
if(offset > Maxshmsize || n > (Maxshmsize - offset))
@@ -442,6 +447,7 @@
c->qid.vers = v->vers;
wunlock(v);
+ DBG("v->value[0] %c\n", ((char *)v->value)[0]);
return n;
}
binary files a/tests/fthtests.sh b/tests/fthtests.sh differ
--- a/usr/inferno/lib/profile
+++ b/usr/inferno/lib/profile
@@ -3,3 +3,6 @@
echo starting /usr/inferno/lib/profile
cp /locale/US_Arizona /locale/timezone
+
+echo running forth tests
+/n/remote/tests/fthtests.sh