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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [hwtests/] [serial/] [pc2fpga/] [receive1.s] - Blame information for rev 90

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

Line No. Rev Author Line
1 14 hellwig
;
2
; receive.s -- receive & check a stream of bytes
3
;
4
 
5
; $8  serial base address
6
; $9  temporary value
7
; $10 current character
8
; $11 previous character
9
; $12 counter
10
; $13 error
11
; $31 return address
12
 
13
        .set    tba,0xF0300010
14
 
15
        add     $8,$0,tba
16
        add     $12,$0,100000
17
        add     $13,$0,0
18
        jal     in
19
        add     $11,$10,0
20
        sub     $12,$12,1
21
loop:
22
        add     $11,$11,1
23
        and     $11,$11,0xFF
24
        jal     in
25
        beq     $10,$11,chrok
26
        add     $13,$13,1
27
chrok:
28
        sub     $12,$12,1
29
        bne     $12,$0,loop
30
        bne     $13,$0,error
31
        add     $13,$0,'.'
32
        jal     out
33
        j       halt
34
error:
35
        add     $13,$0,'?'
36
        jal     out
37
        j       halt
38
 
39
halt:
40
        j       halt
41
 
42
in:
43
        ldw     $9,$8,0
44
        and     $9,$9,1
45
        beq     $9,$0,in
46
        ldw     $10,$8,4
47
        jr      $31
48
 
49
out:
50
        ldw     $9,$8,8
51
        and     $9,$9,1
52
        beq     $9,$0,out
53
        stw     $13,$8,12
54
        jr      $31

powered by: WebSVN 2.1.0

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