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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [simtest/] [rom/] [rom06.s] - Blame information for rev 252

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

Line No. Rev Author Line
1 9 hellwig
;
2
; rom06.s -- "crossed" echo with two terminals, polled
3
;
4
 
5 25 hellwig
        .set    tba0,0xF0300000 ; terminal base address 0
6
        .set    tba1,0xF0301000 ; terminal base address 1
7 9 hellwig
 
8 25 hellwig
        add     $8,$0,tba0       ; set $8 to terminal base address 0
9
        add     $9,$0,tba1       ; set $9 to terminal base address 1
10 9 hellwig
L1:
11 25 hellwig
        ldw     $10,$8,0 ; load receiver status into $10
12
        and     $10,$10,1       ; check receiver ready
13
        beq     $10,$0,L3        ; not ready - check other terminal
14
        ldw     $11,$8,4        ; load receiver data into $11
15 9 hellwig
L2:
16 25 hellwig
        ldw     $10,$9,8        ; load transmitter status into $10
17
        and     $10,$10,1       ; check transmitter ready
18
        beq     $10,$0,L2        ; loop while not ready
19
        stw     $11,$9,12       ; load char into transmitter data
20 9 hellwig
L3:
21 25 hellwig
        ldw     $10,$9,0 ; load receiver status into $10
22
        and     $10,$10,1       ; check receiver ready
23
        beq     $10,$0,L1        ; not ready - check other terminal
24
        ldw     $11,$9,4        ; load receiver data into $11
25 9 hellwig
L4:
26 25 hellwig
        ldw     $10,$8,8        ; load transmitter status into $10
27
        and     $10,$10,1       ; check transmitter ready
28
        beq     $10,$0,L4        ; loop while not ready
29
        stw     $11,$8,12       ; load char into transmitter data
30 9 hellwig
        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.