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

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [verif/] [system/] [microbus/] [test.asm] - Blame information for rev 179

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 117 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 117 arniml
        ;;
4
        ;; Test the MICROBUS functionality.
5
        ;;
6
 
7
        ;; the cpu type is defined on asl's command line
8
 
9
        org     0x00
10
        clra
11
 
12
        ;; init counter with 0
13
        xad     3, 15
14
 
15
 
16
        ;;
17
        ;; microbus data is written to RAM register 0&1, digits 0-11
18
        ;;
19
 
20
read_next_char:
21
        ;; request data
22
        ogi     0x1
23
poll_write:
24
        skgbz   0
25
        jp      poll_write
26
 
27
        ;; read posted data
28
        cqma
29
        x       1               ; put A to R0, Q[3:0]
30
        x       1               ; put M to R1, Q[7:4]
31
 
32
        ;; check increment
33
        ldd     3, 15
34
        aisc    0x1
35
        cab                     ; set new Bd
36
        xad     3, 15
37
        aisc    0x5             ; check for old Bd == 0xb
38
        jmp     read_next_char
39
 
40
 
41
        ;;
42
        ;; output received string
43
        ;;
44
 
45
        ;; init counter with 0
46
        clra
47
        cab
48
        xad     3, 15
49
 
50
write_next_char:
51
        ld      1
52
        ld      1               ; load A from    R1, Q[7:4]
53
                                ; present M from R0, Q[3:0]
54
        camq
55
 
56
        ;; request read
57
        ogi     0x1
58
poll_read:
59
        skgbz   0
60
        jp      poll_read
61
 
62
        ;; check increment
63
        ldd     3, 15
64
        aisc    0x1
65
        cab                     ; set new Bd
66
        xad     3, 15
67
        aisc    0x5             ; check for old Bd == 0xb
68
        jmp     write_next_char
69
 
70
 
71
        jmp     .

powered by: WebSVN 2.1.0

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