function print() {
    __asmh__({},"#include <stdio.h>");
    for ( var i = 0, e = arguments.length; i < e; ++i ) {
        if (i > 0)
            __asm__({},[],[],"putchar(' ');");
        __asm__({},[],[["x", arguments[i]]],
                '%[x] = js::toString(&frame, %[x]);\n'+
                'printf("%s", %[x].raw.sval->getStr());'
        );
    }
    __asm__({},[],[],"putchar('\\n');");
}

var console = { log: print };

Function.prototype.call = function call (thisArg)
{
   __asm__({},[],[["thisArg", thisArg]],
            'return argc > 1' +
              '? js::call(&frame, argv[0], argc-1, argv+1)' +
              ': js::call(&frame, argv[0], 1, &%[thisArg]);'
   );
}

@@ -149,32 +149,35 @@
 _asm__(%7B%7D,%5B%5D,%5B%5D,
+%5B%5D,
 %22putchar(' ');%22)
@@ -222,16 +222,19 @@
 ts%5Bi%5D%5D%5D,
+%5B%5D,
 %0A       
@@ -263,22 +263,25 @@
 oString(
-&
+%25%5B%25
 frame
+%5D
 , %25%5Bx%5D);
@@ -376,24 +376,27 @@
 __(%7B%7D,%5B%5D,%5B%5D,
+%5B%5D,
 %22putchar('%5C%5C
@@ -492,16 +492,24 @@
 g)%0A%7B%0A   
+ return 
 __asm__(
@@ -508,24 +508,32 @@
 __asm__(%7B%7D,%5B
+%22result%22
 %5D,%5B%5B%22thisArg
@@ -545,16 +545,19 @@
 isArg%5D%5D,
+%5B%5D,
 %0A       
@@ -561,32 +561,37 @@
     
-    'return 
+'%25%5Bresult%5D = %25%5B%25
 argc
+%5D
  %3E 1' +%0A
     
@@ -582,26 +582,24 @@
 rgc%5D %3E 1' +%0A
-  
             
@@ -614,46 +614,59 @@
 all(
-&
+%25%5B%25
 frame
+%5D
 , 
+%25%5B%25
 argv
+%5D
 %5B0%5D, 
+%25%5B%25
 argc
+%5D
 -1, 
+%25%5B%25
 argv
+%5D
 +1)' +%0A
-  
     
@@ -689,20 +689,27 @@
 all(
-&
+%25%5B%25
 frame
+%5D
 , 
+%25%5B%25
 argv
+%5D
 %5B0%5D,
@@ -730,13 +730,15 @@
 %5D);'%0A   
+ 
 );%0A%7D
+;
 %0A

update for the latest __asm__ changes