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

Subversion Repositories eco32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /eco32/trunk/simtest
    from Rev 24 to Rev 25
    Reverse comparison

Rev 24 → Rev 25

/rom/rom05.s
8,7 → 8,7
; $11 pointer to string
; $31 return address
 
.set tba,0xF0300010
.set tba,0xF0301000
 
add $8,$0,tba
add $11,$0,hello
/rom/rom06.s
2,27 → 2,29
; rom06.s -- "crossed" echo with two terminals, polled
;
 
.set tba,0xF0300000 ; terminal base address
.set tba0,0xF0300000 ; terminal base address 0
.set tba1,0xF0301000 ; terminal base address 1
 
add $8,$0,tba ; set terminal base address
add $8,$0,tba0 ; set $8 to terminal base address 0
add $9,$0,tba1 ; set $9 to terminal base address 1
L1:
ldw $9,$8,0 ; load receiver status into $9
and $9,$9,1 ; check receiver ready
beq $9,$0,L3 ; not ready - check other terminal
ldw $10,$8,4 ; load receiver data into $10
ldw $10,$8,0 ; load receiver status into $10
and $10,$10,1 ; check receiver ready
beq $10,$0,L3 ; not ready - check other terminal
ldw $11,$8,4 ; load receiver data into $11
L2:
ldw $9,$8,24 ; load transmitter status into $9
and $9,$9,1 ; check transmitter ready
beq $9,$0,L2 ; loop while not ready
stw $10,$8,28 ; load char into transmitter data
ldw $10,$9,8 ; load transmitter status into $10
and $10,$10,1 ; check transmitter ready
beq $10,$0,L2 ; loop while not ready
stw $11,$9,12 ; load char into transmitter data
L3:
ldw $9,$8,16 ; load receiver status into $9
and $9,$9,1 ; check receiver ready
beq $9,$0,L1 ; not ready - check other terminal
ldw $10,$8,20 ; load receiver data into $10
ldw $10,$9,0 ; load receiver status into $10
and $10,$10,1 ; check receiver ready
beq $10,$0,L1 ; not ready - check other terminal
ldw $11,$9,4 ; load receiver data into $11
L4:
ldw $9,$8,8 ; load transmitter status into $9
and $9,$9,1 ; check transmitter ready
beq $9,$0,L4 ; loop while not ready
stw $10,$8,12 ; load char into transmitter data
ldw $10,$8,8 ; load transmitter status into $10
and $10,$10,1 ; check transmitter ready
beq $10,$0,L4 ; loop while not ready
stw $11,$8,12 ; load char into transmitter data
j L1 ; all over again

powered by: WebSVN 2.1.0

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