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

Subversion Repositories t400

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 99 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 99 arniml
        ;;
4
        ;; Checks interrupt on SKMBZ.
5
        ;; AISC is interrupted twice:
6
        ;;   1) no carry, thus no skip
7
        ;;   2) carry, skip after interrupt completion
8
        ;;
9
 
10
        ;; the cpu type is defined on asl's command line
11
 
12
        include "int_macros.inc"
13
 
14
        org     0x00
15
        clra
16
 
17
        int_flag_clear
18
        ;; write return instruction identifier to current M
19
        ;; ret_instr_030 = 0x01
20
        clra
21
        aisc    0x1
22
        x       0
23
 
24
        lei     0x02
25
        jp      int_mark_030
26
 
27
        org     0x030
28
int_mark_030:
29
        nop
30
        nop
31
int_instr_030:
32
        skmbz   0x1
33
ret_instr_030:
34
        jmp     fail            ; must be skipped!
35
 
36
        ;; check whether interrupt really occured
37
        int_flag_check
38
 
39
        ;;
40
        ;; prepare next interrupt
41
        ;;
42
        int_flag_clear
43
        ;; write return instruction identifier to current M
44
        ;; ret_instr_0b0 = 0x2
45
        clra
46
        aisc    0x2
47
        x       0
48
 
49
        lei     0x02
50
        jmp     int_mark_0b0
51
 
52
        org     0x0ae
53
        jmp     fail
54
        org     0x0b0
55
int_mark_0b0:
56
        nop
57
        nop
58
int_instr_0b0:
59
        skmbz   0x1
60
ret_instr_0b0:
61
        jp      +               ; must not be skipped!
62
        jmp     fail            ; must be skipped!
63
+
64
 
65
        ;; check whether interrupt really occured
66
        int_flag_check
67
 
68
        ;;
69
        ;; prepare next interrupt
70
        ;;
71
        int_flag_clear
72
        ;; write return instruction identifier to current M
73
        ;; ret_instr_230 = 0x4
74
        clra
75
        aisc    0x4
76
        x       0
77
 
78
        lei     0x02
79
        jmp     int_mark_230
80
 
81
        org     0x22e
82
        jmp     fail
83
        org     0x230
84
int_mark_230:
85
        nop
86
        skmbz   0x3
87
int_instr_230:
88
        jmp     fail            ; must be skipped
89
ret_instr_230:
90
 
91
        ;; check whether interrupt really occured
92
        int_flag_check
93
 
94
        ;;
95
        ;; prepare next interrupt
96
        ;;
97
        int_flag_clear
98
        ;; write return instruction identifier to current M
99
        ;; ret_instr_330 = 0x8
100
        clra
101
        aisc 0x8
102
        x       0
103
 
104
        lei     0x02
105
        jmp     int_mark_330
106
 
107
        org     0x32e
108
        jmp     fail
109
        org     0x330
110
int_mark_330:
111
        nop
112
        skmbz   0x3
113
int_instr_330:
114
        jp      +               ; must not be skipped!
115
        jmp     fail
116
+
117
        nop
118
ret_instr_330:
119
 
120
        ;; check whether interrupt really occured
121
        int_flag_check
122
 
123
        jmp     pass
124
 
125
 
126
        ;; *******************************************************************
127
        ;; Interrupt routine
128
        ;;
129
        org     0x0fd
130
        jmp     fail
131
int_routine:
132
        nop
133
        save_a_m_c
134
 
135
        int_flag_set
136
 
137
        ;; access current M of main program
138
        ldd     3, 14
139
        x       0
140
        skmbz   0x0
141
        jp      check_sa_030
142
        skmbz   0x1
143
        jp      check_sa_0b0
144
        skmbz   0x2
145
        jmp     check_sa_230
146
        skmbz   0x3
147
        jmp     check_sa_330
148
        jmp     fail
149
 
150
check_sa_030:
151
        check_sa        ret_instr_030
152
        jmp     int_finished
153
check_sa_0b0:
154
        check_sa        ret_instr_0b0
155
        jmp     int_finished
156
check_sa_230:
157
        check_sa        ret_instr_230
158
        jmp     int_finished
159
check_sa_330:
160
        check_sa        ret_instr_330
161
 
162
int_finished:
163
        restore_c_m_a
164
        ret
165
        ;;
166
        ;; *******************************************************************
167
 
168
 
169
        org     0x200
170
        include "int_pass_fail.asm"

powered by: WebSVN 2.1.0

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