OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [copy/] [copy.s] - Blame information for rev 141

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 62 hellwig
;
2
; copy.s -- copy a program from ROM to RAM before executing it
3
;
4
 
5
        .set    dst,0xC0000000          ; destination is start of RAM
6
        .set    len,0x0000C000          ; number of bytes to be copied
7
 
8
        .set    PSW,0                    ; reg # of PSW
9
 
10
reset:
11
        j       start
12
 
13
interrupt:
14
        j       interrupt               ; we better have no interrupts
15
 
16
userMiss:
17
        j       userMiss                ; and no user TLB misses
18
 
19
start:
20
        mvts    $0,PSW                   ; disable interrupts and user mode
21
        add     $8,$0,src
22
        add     $9,$0,dst
23
        add     $10,$9,len
24
loop:
25
        ldw     $11,$8,0         ; copy word
26
        stw     $11,$9,0
27
        add     $8,$8,4                 ; bump pointers
28
        add     $9,$9,4
29
        bltu    $9,$10,loop             ; more?
30
        add     $8,$0,dst                ; start execution
31
        jr      $8
32
 
33
        ; the program to be copied follows immediately
34
src:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.