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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [hwtests/] [serial/] [sertest/] [echo1.s] - Blame information for rev 260

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

Line No. Rev Author Line
1 14 hellwig
;
2
; echo.s -- test the serial interface
3
;
4
 
5 132 hellwig
        .set    sba,0xF0301000  ; serial base address
6 14 hellwig
 
7
        add     $8,$0,sba        ; set serial 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,L1 ; loop while not ready
12
        ldw     $10,$8,4        ; load receiver data into $10
13
        add     $10,$10,0x5C
14
        and     $10,$10,0xFF
15
L2:
16
        ldw     $9,$8,8         ; load transmitter status into $9
17
        and     $9,$9,1         ; check transmitter ready
18
        beq     $9,$0,L2 ; loop while not ready
19
        stw     $10,$8,12       ; load char into transmitter data
20
        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.