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

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [verif/] [include/] [int_macros.inc] - Blame information for rev 79

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 77 arniml
        ;; *******************************************************************
2 79 arniml
        ;; $Id: int_macros.inc,v 1.2 2006-05-28 13:18:36 arniml Exp $
3 77 arniml
        ;;
4
        ;; Defines macros for interrupt tests.
5
        ;;
6
 
7 79 arniml
        ;; -------------------------------------------------------------------
8
        ;; Save current A, M and C to M(3,15), M(3,14) and M(3,13).
9
        ;;
10
save_m_c        MACRO
11
        xad     3, 15           ; save A to M(3,15)
12
 
13
        x       0                ; save current M
14
        xad     3, 14           ; to M(3,14)
15
 
16
        smb     0x0             ; save C
17
        skc                     ; to M(3,13)
18
        rmb     0x0             ;
19
        x       0                ;
20
        xad     3, 13           ;
21
        ENDM
22
 
23
 
24
        ;; -------------------------------------------------------------------
25
        ;; Check SA against specified address
26
        ;;
27 77 arniml
check_sa        MACRO   addr
28
        ;; request nibble 0 of SA
29
        ogi     0x0
30
        inl
31
        ;; check this nibble
32
        x       0
33
        clra
34
        IF      addr & 0xf <> 0
35
        aisc    addr & 0xf
36
        ENDIF
37
        ske
38
        jmp     fail
39
 
40
        ;; request nibble 1 of SA
41
        ogi     0x1
42
        inl
43
        ;; check this nibble
44
        x       0
45
        clra
46
        IF      addr & 0x0f0 <> 0
47
        aisc    (addr >> 4) & 0xf
48
        ENDIF
49
        ske
50
        jmp     fail
51
 
52
        ;; request nibble 2 of SA
53
        ogi     0x2
54
        inl
55
        ;; check this nibble
56
        x       0
57
        clra
58
        IF      addr & 0xf00 <> 0
59
        aisc    (addr >> 8) & 0xf
60
        ENDIF
61
        ske
62
        jmp     fail
63
 
64
        ENDM
65 79 arniml
 
66
 
67
        ;; -------------------------------------------------------------------
68
        ;; Restore C, M and A from M(3,13), M(3,14) and M(3,15)
69
        ;;
70
restore_c_m     MACRO
71
        xad     3, 13           ; restore C
72
        x       0                ; from M(3,13)
73
        rc                      ;
74
        skmbz   0x0             ;
75
        sc                      ;
76
 
77
        xad     3, 14           ; restore current M
78
        x       0                ; from M(3,14)
79
 
80
        xad     3, 15           ; restore A
81
        ENDM

powered by: WebSVN 2.1.0

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