 -    if (!pos || size <= pos) /* tuples are indexed from 1 (probably later 0-255)*/
 -       return IFALSE;
 -    return ob[pos];
--@@ -587,8 +595,8 @@ static word prim_set(word wptr, word pos, word val) {
+-@@ -587,8 +629,8 @@ static word prim_set(word wptr, word pos, word val) {
 -    pos = fixval(pos);
 -    if(immediatep(ob)) { return IFALSE; }
 -    hdr = *ob;

- #define OCLOSE(proctype)            { word size = *ip++, tmp; word *ob; allocate(size, ob); tmp = R[*ip++]; tmp = ((word *) tmp)[*ip++]; *ob = make_header(size, proctype); ob[1] = tmp; tmp = 2; while(tmp != size) { ob[tmp++] = R[*ip++]; } R[*ip++] = (word) ob; }
- #define CLOSE1(proctype)            { word size = *ip++, tmp; word *ob; allocate(size, ob); tmp = R[1]; tmp = ((word *) tmp)[*ip++]; *ob = make_header(size, proctype); ob[1] = tmp; tmp = 2; while(tmp != size) { ob[tmp++] = R[*ip++]; } R[*ip++] = (word) ob; }
- #define EXEC switch(op&63) { \
-@@ -168,11 +169,14 @@ static __inline__ word *chase(word *pos) {
-    return pos;
- }
- 
--static void marks(word *pos, word *end) {
-+static void mark(word *pos, word *end) {
-+   //fprintf(stderr, "mark %d\n", pos);
-    while (pos != end) {
-       word val = *pos;
-+      //fprintf(stderr, "mark at %d\n", pos);
-       if (allocp(val) && val >= ((word) genstart)) { 
-          if (flagged(val)) {
-+            //fprintf(stderr, "flagged\n");
-             pos = ((word *) flag(chase((word *) val))) - 1;
-          } else {
-             word hdr = V(val);
-@@ -180,6 +184,7 @@ static void marks(word *pos, word *end) {
-             if (flagged_or_raw(hdr)) {
-                pos--;
-             } else {
-+               fprintf(stderr, "stepping %d, header %d\n", hdrsize(hdr)-1);
-                pos = ((word *) val) + (hdrsize(hdr)-1);
-             }
-          }
-@@ -271,12 +276,14 @@ static word *gc(int size, word *regs) {
-    word *root;
-    word *realend = memend;
-    int nfree, nused;
--   fp = regs + imm_val(*regs);
-+   fprintf(stderr, "GC\n");
-+   fp = regs + hdrsize(*regs);
-    root = fp+1;
-    *root = (word) regs;
--   fflush(stdout);
-    memend = fp;
--   marks(root, fp);
-+   //fprintf(stderr, "GC AAAA\n");
-+   mark(root, fp);
-+   //fprintf(stderr, "GC BBBB\n");
-    fp = compact();
-    regs = (word *) *root;
-    memend = realend;
-@@ -291,7 +298,7 @@ static word *gc(int size, word *regs) {
-       nfree -= size*W + MEMPAD;   /* how much really could be snipped off */
-       if (nfree < (heapsize / 20) || nfree < 0) {
-          /* increase heap size if less than 5% is free by ~10% of heap size (growth usually implies more growth) */

-    if (likely(allocp(ob))) {
-       word hdr = *ob & 4095;
-       if (hdr == 262) { /* proc  */ 
-@@ -1005,7 +1049,9 @@ switch_thread: /* enter mcp if present */
-       goto apply;
-    }
- invoke: /* nargs and regs ready, maybe gc and execute ob */
--   if (((word)fp) + 1024*64 >= ((word) memend)) { /* <- fixme... can be lowered after the compiler pass */
-+   if (((word)fp) + 1024*64 >= ((word) memend))
-+      //(1)  // always gc
-+	{
-       int p = 0; 
-       *fp = make_header(NR+2, 50); /* hdr r_0 .. r_(NR-1) ob */ 
-       while(p < NR) { fp[p+1] = R[p]; p++; } 
-@@ -1020,6 +1066,7 @@ invoke: /* nargs and regs ready, maybe gc and execute ob */
- 
-    if (op) {
-       main_dispatch:
