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

Subversion Repositories blue

[/] [blue/] [trunk/] [blue8/] [syslib.inc] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wd5gnr
crlf:
2
        lda cr+CODEOFFSET
3
        call printchar+CODEOFFSET
4
        lda lf+CODEOFFSET
5
printchar:
6
        call xmitwait+CODEOFFSET
7
        sta uart+1
8
        ret
9
 
10
print_msgcr:
11
        popx
12
        call print_msgx+CODEOFFSET
13
        call crlf+CODEOFFSET
14
        incx
15
        pushx
16
        ret
17
 
18
print_msg:
19
        popx
20
        call print_msgx+CODEOFFSET
21
        incx
22
        pushx
23
        ret
24
 
25
 
26
print_msgx:
27
        ldax 0
28
        spos
29
        ret
30
        swap
31
        call printchar+CODEOFFSET
32
        ldax 0
33
        swap
34
        spos
35
        ret
36
        swap
37
        call printchar+CODEOFFSET
38
        incx
39
        jmp print_msgx+CODEOFFSET
40
 
41
 
42
xmitwait:
43
        push
44
        lda uart
45
        sneg
46
        jmp xmitwait+1+CODEOFFSET
47
        pop
48
        ret
49
 
50
 
51
waitchar:
52
        lda uart+1
53
        sneg
54
        jmp waitchar+CODEOFFSET
55
        and ff+CODEOFFSET
56
        ret
57
ff:     dw 0xFF
58
cr:     dw 0x0d
59
lf:     dw 0x0a
60
; note this is a bit wasteful since it sends 2xCR+LF
61
; also, it converts \r to \n
62
waitcharecho:
63
        call waitchar+CODEOFFSET
64
        call printchar+CODEOFFSET
65
        cmp cr+CODEOFFSET
66
        snz
67
        call crlf+CODEOFFSET
68
        ret
69
 
70
 
71
 
72
 
73
 
74
 
75
 
76
 
77
 

powered by: WebSVN 2.1.0

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