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

Subversion Repositories eco32

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

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
        .set    tba,0xF0300000  ; terminal base address
6
 
7
        add     $8,$0,tba        ; set terminal base address
8
L1:
9
        ldw     $9,$8,0          ; load receiver status into $9
10
        and     $9,$9,1         ; check receiver ready
11
        beq     $9,$0,L3 ; not ready - check other terminal
12
        ldw     $10,$8,4        ; load receiver data into $10
13
L2:
14
        ldw     $9,$8,24        ; load transmitter status into $9
15
        and     $9,$9,1         ; check transmitter ready
16
        beq     $9,$0,L2 ; loop while not ready
17
        stw     $10,$8,28       ; load char into transmitter data
18
L3:
19
        ldw     $9,$8,16        ; load receiver status into $9
20
        and     $9,$9,1         ; check receiver ready
21
        beq     $9,$0,L1 ; not ready - check other terminal
22
        ldw     $10,$8,20       ; load receiver data into $10
23
L4:
24
        ldw     $9,$8,8         ; load transmitter status into $9
25
        and     $9,$9,1         ; check transmitter ready
26
        beq     $9,$0,L4 ; loop while not ready
27
        stw     $10,$8,12       ; load char into transmitter data
28
        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.