diff --git a/byterun/byterun.c b/byterun/byterun.c index 82f468d4c..fea6e65c5 100644 --- a/byterun/byterun.c +++ b/byterun/byterun.c @@ -209,7 +209,7 @@ void disassemble (FILE *f, bytefile *bf) { break; case 6: - fprintf (f, "CALL\t%0x%.8x ", INT); + fprintf (f, "CALL\t0x%.8x ", INT); fprintf (f, "%d", INT); break; @@ -259,7 +259,7 @@ void disassemble (FILE *f, bytefile *bf) { break; case 4: - fprintf (f, "CALL\tBarray"); + fprintf (f, "CALL\tBarray\t%d", INT); break; default: diff --git a/src/SM.ml b/src/SM.ml index 097e7cd51..43362125b 100644 --- a/src/SM.ml +++ b/src/SM.ml @@ -191,8 +191,8 @@ module ByteCode = (* 0x70 *) | CALL ("Lread", _, _) -> add_bytes [7*16 + 0] (* 0x71 *) | CALL ("Lwrite", _, _) -> add_bytes [7*16 + 1] (* 0x72 *) | CALL ("Llength", _, _) -> add_bytes [7*16 + 2] - (* 0x72 *) | CALL ("Lstring", _, _) -> add_bytes [7*16 + 3] - (* 0x72 *) | CALL (".array", _, _) -> add_bytes [7*16 + 4] + (* 0x73 *) | CALL ("Lstring", _, _) -> add_bytes [7*16 + 3] + (* 0x74 *) | CALL (".array", n, _) -> add_bytes [7*16 + 4]; add_ints [n] (* 0x52 n:32 n:32 *) | BEGIN (_, a, l, [], _, _) -> add_bytes [5*16 + 2]; add_ints [a; l] (* with no closure *) (* 0x53 n:32 n:32 *) | BEGIN (_, a, l, _, _, _) -> add_bytes [5*16 + 3]; add_ints [a; l] (* with a closure *)