]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/make/m16c62p/crt.S
Added faster baud rate speed when using sm16cf to program Mulle.
[tinyos-2.x.git] / support / make / m16c62p / crt.S
index 14ea172237f9dd8e378baa1d69200c09f873d5f3..6a9cbe9bd67829017c56c8c82987a4cb6a4b0ae2 100755 (executable)
@@ -47,7 +47,7 @@
 
 .text
        .global __vector_default
-
+       .global m32c_jsri16
        .extern _main
 
 .section .init0,"ax",@progbits
@@ -88,6 +88,25 @@ _start:
        /* In case we return, should realy generate a reset :/ */
        jmp.b   0
 
+m32c_jsri16:
+    add.w    #-1, sp
+    /* Read the address (16 bits) and return address (24 bits) off
+    the stack.  */
+    mov.w    4[sp], r0
+    mov.w    1[sp], r3
+    mov.b    3[sp], a0 /* This zero-extends, so the high byte has
+                          zero in it.  */
+    /* Write the return address, then new address, to the stack.  */
+    mov.w    a0, 1[sp] /* Just to get the zero in 2[sp].  */
+    mov.w    r0, 0[sp]
+    mov.w    r3, 3[sp]
+    mov.b    a0, 5[sp]
+
+    /* This "returns" to the target address, leaving the pending
+    return address on the stack.  */
+    rts
+
+
 /* We should probably not get here. */
 __vector_default:
        jmp.a   __vector_default