#include "main.c" int main(int argc, char **argv) { int i, bits; unsigned char buf[1024] = {0}; Bitbuf b = {.out = buf, .bits = 0}; bits = b.bits; printf ("assemble:\n"); if (argc>1) { bits = rarvm_assemble (&b, argv[1]); } else { //bits = rarvm_assemble (&b, "mov r2, #33"); //bits = rarvm_assemble (&b, "add r4, r5"); bits = rarvm_assemble (&b, "xor r2, r3"); // 0 000 0 1 001 01 101111100000000000000000000000000000000 //bitadd (&b, 1, 2); //bits = rarvm_assemble (&b, "mov r1, [r2+#3]"); } for (i=0; i "); bits=16; for (i=0; i