Welcome to mirror list, hosted at ThFree Co, Russian Federation.

WordCopyArm.asm « bossa « src - github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9f291d07b17722585dfa9f80c7ce2feebb1a90e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    .global start
    .global stack
    .global reset
    .global dst_addr
    .global src_addr
    .global words

    .text
    .thumb
    .align 0

start:
    ldr     r0, dst_addr
    ldr     r1, src_addr
    ldr     r2, words
    b       check
    
copy:
    ldmia   r1!, {r3}
    stmia   r0!, {r3}
    sub     r2, #1
    
check:
    cmp     r2, #0
    bne     copy
    
    @ Fix for SAM-BA stack bug
    ldr     r0, reset
    cmp     r0, #0
    bne     return
    ldr     r0, stack
    mov     sp, r0

return:
    bx      lr

    .align  0
stack:
    .word   0
reset:
    .word   0
dst_addr:
    .word   0
src_addr:
    .word   0
words:
    .word   0