deepjit shits around \o/
authorMartin Perner <martin@perner.cc>
Thu, 13 Jan 2011 15:48:32 +0000 (16:48 +0100)
committerMartin PERNER <c0725782@ti18.(none)>
Thu, 13 Jan 2011 15:48:54 +0000 (16:48 +0100)
progs/deepjit.s

index ef127c2c63941aacf36ea0b4f92ec57bd9838eb4..400b6eb98f2e829348f25d72ac94e6de0ae1200b 100644 (file)
@@ -73,7 +73,8 @@ prog_lessthan:
 .ifill pushge r15
 
 prog_dup:
-.ifill fetch r6
+.ifill pop r6
+.ifill push r6
 .ifill push r6
 
 prog_jmp:
@@ -89,7 +90,7 @@ prog_imm:
 .ifill push r6
 
 prog_pop:
-.ifill disc r6
+.ifill pop r6
 
 prog_xch:
 .ifill pop r6
@@ -114,6 +115,11 @@ prog_not:
        .define PBASE, 0x2030
        .define PADDR, 0x4
        .define PDATA, 0x8
+.org 0
+start:
+       call main
+       call main
+       ret
 
 
 main:
@@ -135,10 +141,12 @@ u_test:
        brnz+ u_test ; branch if not zero
        stb r0, UART_TRANS(r10)
 
+
        ;set address of input
        ldis r1, inputdata@lo
        ldih r1, inputdata@hi
 
+
        ;set address of program start
        ldis r2, (prog_start/4)@lo
        ldih r2, (prog_start/4)@hi
@@ -154,6 +162,7 @@ u_test:
        ldis r13, PBASE@lo
        ldih r13, PBASE@hi
 
+
        ;set programmer address
        stw r2, PADDR(r13)
 
@@ -427,9 +436,11 @@ vm_dup:
        PROGINSTR
        ldw r0, 4(r4)
        PROGINSTR
+       ldw r0, 8(r4)
+       PROGINSTR
 
        ;increment address
-       addi r2, r2, 2
+       addi r2, r2, 3
 
        br+ vm_loop