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

Subversion Repositories t400

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 92 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 92 arniml
        ;;
4
        ;; Checks interrupt on JSR and RET.
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_230 = 0x01
17
        clra
18
        aisc    0x1
19
        x       0
20
 
21
        lei     0x02
22
        jmp     int_mark_230
23
 
24
        org     0x230
25
int_mark_230:
26
        nop
27
        nop
28
int_instr_230:
29
        jsr     prep_2b0
30
        nop
31
ret_instr_2b0:
32
        ;; check whether interrupt really occured
33
        int_flag_check
34
 
35
        jmp     pass
36
 
37
 
38
        org     0x290
39
        jmp     fail
40
        org     0x292
41
prep_2b0:
42
        nop
43
ret_instr_230:
44
        ;; check whether interrupt really occured
45
        int_flag_check
46
 
47
        ;;
48
        ;; prepare next interrupt
49
        ;;
50
        int_flag_clear
51
        ;; write return instruction identifier to current M
52
        ;; ret_instr_2b0 = 0x2
53
        clra
54
        aisc    0x2
55
        x       0
56
 
57
        lei     0x02
58
        jp      int_mark_2b0
59
 
60
        org     0x2ae
61
        jmp     fail
62
        org     0x2b0
63
int_mark_2b0:
64
        nop
65
        nop
66
int_instr_2b0:
67
        ret
68
 
69
 
70
        ;; *******************************************************************
71
        ;; Interrupt routine
72
        ;;
73
        org     0x0fd
74
        jmp     fail
75
int_routine:
76
        nop
77
        save_a_m_c
78
 
79
        int_flag_set
80
 
81
        ;; access current M of main program
82
        ldd     3, 14
83
        x       0
84
        skmbz   0x0
85 94 arniml
        jp      check_sa_230
86 92 arniml
        skmbz   0x1
87 94 arniml
        jp      check_sa_2b0
88 92 arniml
        jmp     fail
89
 
90
check_sa_230:
91
        check_sa        ret_instr_230
92
        jmp     int_finished
93
check_sa_2b0:
94
        check_sa        ret_instr_2b0
95
 
96
int_finished:
97
        restore_c_m_a
98
        ret
99
        ;;
100
        ;; *******************************************************************
101
 
102
 
103
        org     0x200
104
        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.