;r9 ... address to actual entry in defer table
;r10... address to defer table
+ ;load address of program
+ ldil r14, prog_mul@lo
+ ldih r14, prog_mul@hi
+
ldil r15, prog_consts@lo
ldih r15, prog_consts@hi
;case *
;42
vm_mul:
- ;load address of program
- ldil r4, prog_mul@lo
- ldih r4, prog_mul@hi
-
;program instruction (14)
- ldw r0, 0(r4)
+ ldw r0, 0(r14)
stx r0, 0(r2)
- ldw r0, 4(r4)
+ ldw r0, 4(r14)
stx r0, 4(r2)
- ldw r0, 8(r4)
+ ldw r0, 8(r14)
stx r0, 8(r2)
- ldw r0, 12(r4)
+ ldw r0, 12(r14)
stx r0, 12(r2)
- ldw r0, 16(r4)
+ ldw r0, 16(r14)
stx r0, 16(r2)
- ldw r0, 20(r4)
+ ldw r0, 20(r14)
stx r0, 20(r2)
- ldw r0, 24(r4)
+ ldw r0, 24(r14)
stx r0, 24(r2)
- ldw r0, 28(r4)
+ ldw r0, 28(r14)
stx r0, 28(r2)
- ldw r0, 32(r4)
+ ldw r0, 32(r14)
stx r0, 32(r2)
- ldw r0, 36(r4)
+ ldw r0, 36(r14)
stx r0, 36(r2)
- ldw r0, 40(r4)
+ ldw r0, 40(r14)
stx r0, 40(r2)
- ldw r0, 44(r4)
+ ldw r0, 44(r14)
stx r0, 44(r2)
- ldw r0, 48(r4)
+ ldw r0, 48(r14)
stx r0, 48(r2)
- ldw r0, 52(r4)
+ ldw r0, 52(r14)
stx r0, 52(r2)
;increment address
int8_t op = insns[pc];
int32_t t;
+ printf("pc: %d op: %c\n", pc, op);
/* putchar(op); */
/* printf(" %d/%d:\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\n", */