URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/eco32/tags/eco32-0.24/monitor/monitor/copy
- from Rev 200 to Rev 211
- ↔ Reverse comparison
Rev 200 → Rev 211
/copy.s
0,0 → 1,34
; |
; copy.s -- copy a program from ROM to RAM before executing it |
; |
|
.set dst,0xC0000000 ; destination is start of RAM |
.set len,0x0000FF00 ; number of bytes to be copied |
|
.set PSW,0 ; reg # of PSW |
|
reset: |
j start |
|
interrupt: |
j interrupt ; we better have no interrupts |
|
userMiss: |
j userMiss ; and no user TLB misses |
|
start: |
mvts $0,PSW ; disable interrupts and user mode |
add $8,$0,src |
add $9,$0,dst |
add $10,$9,len |
loop: |
ldw $11,$8,0 ; copy word |
stw $11,$9,0 |
add $8,$8,4 ; bump pointers |
add $9,$9,4 |
bltu $9,$10,loop ; more? |
add $8,$0,dst ; start execution |
jr $8 |
|
; the program to be copied follows immediately |
src: |
/Makefile
0,0 → 1,21
# |
# Makefile for ROM-to-RAM copy program |
# |
|
BUILD = ../../../build |
|
.PHONY: all install clean |
|
all: copy.bin |
|
install: copy.bin |
|
copy.bin: copy.o |
$(BUILD)/bin/ld -o copy.bin -m copy.map \ |
-h -rc 0xE0000000 copy.o |
|
copy.o: copy.s |
$(BUILD)/bin/as -o copy.o copy.s |
|
clean: |
rm -f *~ copy.o copy.bin copy.map |