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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [common/] [serial.s] - Blame information for rev 242

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

Line No. Rev Author Line
1 59 hellwig
;
2
; serial.s -- the serial line interface
3
;
4
 
5
;***************************************************************
6
 
7
        .set    ser0base,0xF0300000     ; serial line 0 base address
8
        .set    ser1base,0xF0301000     ; serial line 1 base address
9
 
10 182 hellwig
        .export ser0init                ; line 0 initialization
11 59 hellwig
        .export ser0inchk               ; line 0 input check
12
        .export ser0in                  ; line 0 input
13
        .export ser0outchk              ; line 0 output check
14
        .export ser0out                 ; line 0 output
15
 
16 182 hellwig
        .export ser1init                ; line 1 initialization
17 59 hellwig
        .export ser1inchk               ; line 1 input check
18
        .export ser1in                  ; line 1 input
19
        .export ser1outchk              ; line 1 output check
20
        .export ser1out                 ; line 1 output
21
 
22
;***************************************************************
23
 
24
        .code
25
        .align  4
26
 
27 182 hellwig
ser0init:
28 59 hellwig
        jr      $31
29
 
30
ser0inchk:
31
        add     $8,$0,ser0base
32
        ldw     $2,$8,0
33
        and     $2,$2,1
34
        jr      $31
35
 
36
ser0in:
37
        add     $8,$0,ser0base
38
ser0in1:
39
        ldw     $9,$8,0
40
        and     $9,$9,1
41
        beq     $9,$0,ser0in1
42
        ldw     $2,$8,4
43
        jr      $31
44
 
45
ser0outchk:
46
        add     $8,$0,ser0base
47
        ldw     $2,$8,8
48
        and     $2,$2,1
49
        jr      $31
50
 
51
ser0out:
52
        add     $8,$0,ser0base
53
ser0out1:
54
        ldw     $9,$8,8
55
        and     $9,$9,1
56
        beq     $9,$0,ser0out1
57
        stw     $4,$8,12
58
        jr      $31
59
 
60
;***************************************************************
61
 
62
        .code
63
        .align  4
64
 
65 182 hellwig
ser1init:
66
        jr      $31
67
 
68 59 hellwig
ser1inchk:
69
        add     $8,$0,ser1base
70
        ldw     $2,$8,0
71
        and     $2,$2,1
72
        jr      $31
73
 
74
ser1in:
75
        add     $8,$0,ser1base
76
ser1in1:
77
        ldw     $9,$8,0
78
        and     $9,$9,1
79
        beq     $9,$0,ser1in1
80
        ldw     $2,$8,4
81
        jr      $31
82
 
83
ser1outchk:
84
        add     $8,$0,ser1base
85
        ldw     $2,$8,8
86
        and     $2,$2,1
87
        jr      $31
88
 
89
ser1out:
90
        add     $8,$0,ser1base
91
ser1out1:
92
        ldw     $9,$8,8
93
        and     $9,$9,1
94
        beq     $9,$0,ser1out1
95
        stw     $4,$8,12
96
        jr      $31

powered by: WebSVN 2.1.0

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