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

Subversion Repositories t400

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 93 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 93 arniml
        ;;
4
        ;; Checks interrupt on JSRP and RETSK.
5
        ;;
6
 
7
        ;; the cpu type is defined on asl's command line
8
 
9
        include "int_macros.inc"
10
 
11
        org     0x00
12
        clra
13
 
14
        int_flag_clear
15
        ;; write return instruction identifier to current M
16
        ;; ret_instr_1b0 = 0x01
17
        clra
18
        aisc    0x1
19
        x       0
20
 
21
        lei     0x02
22
        jmp     int_mark_1b0
23
 
24
        org     0x1b0
25
int_mark_1b0:
26
        nop
27
        nop
28
int_instr_1b0:
29
        jsrp    prep_0b0
30
        aisc    0x1             ; to be skipped by retsk
31
ret_instr_0b0:
32
        ;; check whether aisc has been skipped
33
        x       0
34
        clra
35
        ske
36
        jmp     fail
37
        ;; check whether interrupt really occured
38
        int_flag_check
39
 
40
        jmp     pass
41
 
42
 
43
        org     0x090
44
        jmp     fail
45
        org     0x092
46
prep_0b0:
47
        nop
48
ret_instr_1b0:
49
        ;; check whether interrupt really occured
50
        int_flag_check
51
 
52
        ;;
53
        ;; prepare next interrupt
54
        ;;
55
        int_flag_clear
56
        ;; write return instruction identifier to current M
57
        ;; ret_instr_0b0 = 0x2
58
        clra
59
        aisc    0x2
60
        x       0
61
 
62
        lei     0x02
63
        jp      int_mark_0b0
64
 
65
        org     0x0ae
66
        jmp     fail
67
        org     0x0b0
68
int_mark_0b0:
69
        nop
70
        clra
71
int_instr_0b0:
72
        retsk
73
 
74
 
75
        ;; *******************************************************************
76
        ;; Interrupt routine
77
        ;;
78
        org     0x0fd
79
        jmp     fail
80
int_routine:
81
        nop
82
        save_a_m_c
83
 
84
        int_flag_set
85
 
86
        ;; access current M of main program
87
        ldd     3, 14
88
        x       0
89
        skmbz   0x0
90
        jp      check_sa_1b0
91
        skmbz   0x1
92
        jp      check_sa_0b0
93
        jmp     fail
94
 
95
check_sa_1b0:
96
        check_sa        ret_instr_1b0
97
        jmp     int_finished
98
check_sa_0b0:
99
        check_sa        ret_instr_0b0
100
 
101
int_finished:
102
        restore_c_m_a
103
        ret
104
        ;;
105
        ;; *******************************************************************
106
 
107
 
108
        org     0x200
109
        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.