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

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [verif/] [include/] [int_macros.inc] - Diff between revs 79 and 83

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 79 Rev 83
        ;; *******************************************************************
        ;; *******************************************************************
        ;; $Id: int_macros.inc,v 1.2 2006-05-28 13:18:36 arniml Exp $
        ;; $Id: int_macros.inc,v 1.3 2006-05-28 13:35:23 arniml Exp $
        ;;
        ;;
        ;; Defines macros for interrupt tests.
        ;; Defines macros for interrupt tests.
        ;;
        ;;
        ;; -------------------------------------------------------------------
        ;; -------------------------------------------------------------------
        ;; Save current A, M and C to M(3,15), M(3,14) and M(3,13).
        ;; Save current A, M and C to M(3,15), M(3,14) and M(3,13).
        ;;
        ;;
save_m_c        MACRO
save_a_m_c      MACRO
        xad     3, 15           ; save A to M(3,15)
        xad     3, 15           ; save A to M(3,15)
        x       0                ; save current M
        x       0                ; save current M
        xad     3, 14           ; to M(3,14)
        xad     3, 14           ; to M(3,14)
        smb     0x0             ; save C
        smb     0x0             ; save C
        skc                     ; to M(3,13)
        skc                     ; to M(3,13)
        rmb     0x0             ;
        rmb     0x0             ;
        x       0                ;
        x       0                ;
        xad     3, 13           ;
        xad     3, 13           ;
        ENDM
        ENDM
        ;; -------------------------------------------------------------------
        ;; -------------------------------------------------------------------
        ;; Check SA against specified address
        ;; Check SA against specified address
        ;;
        ;;
check_sa        MACRO   addr
check_sa        MACRO   addr
        ;; request nibble 0 of SA
        ;; request nibble 0 of SA
        ogi     0x0
        ogi     0x0
        inl
        inl
        ;; check this nibble
        ;; check this nibble
        x       0
        x       0
        clra
        clra
        IF      addr & 0xf <> 0
        IF      addr & 0xf <> 0
        aisc    addr & 0xf
        aisc    addr & 0xf
        ENDIF
        ENDIF
        ske
        ske
        jmp     fail
        jmp     fail
        ;; request nibble 1 of SA
        ;; request nibble 1 of SA
        ogi     0x1
        ogi     0x1
        inl
        inl
        ;; check this nibble
        ;; check this nibble
        x       0
        x       0
        clra
        clra
        IF      addr & 0x0f0 <> 0
        IF      addr & 0x0f0 <> 0
        aisc    (addr >> 4) & 0xf
        aisc    (addr >> 4) & 0xf
        ENDIF
        ENDIF
        ske
        ske
        jmp     fail
        jmp     fail
        ;; request nibble 2 of SA
        ;; request nibble 2 of SA
        ogi     0x2
        ogi     0x2
        inl
        inl
        ;; check this nibble
        ;; check this nibble
        x       0
        x       0
        clra
        clra
        IF      addr & 0xf00 <> 0
        IF      addr & 0xf00 <> 0
        aisc    (addr >> 8) & 0xf
        aisc    (addr >> 8) & 0xf
        ENDIF
        ENDIF
        ske
        ske
        jmp     fail
        jmp     fail
        ENDM
        ENDM
        ;; -------------------------------------------------------------------
        ;; -------------------------------------------------------------------
        ;; Restore C, M and A from M(3,13), M(3,14) and M(3,15)
        ;; Restore C, M and A from M(3,13), M(3,14) and M(3,15)
        ;;
        ;;
restore_c_m     MACRO
restore_c_m_a   MACRO
        xad     3, 13           ; restore C
        xad     3, 13           ; restore C
        x       0                ; from M(3,13)
        x       0                ; from M(3,13)
        rc                      ;
        rc                      ;
        skmbz   0x0             ;
        skmbz   0x0             ;
        sc                      ;
        sc                      ;
        xad     3, 14           ; restore current M
        xad     3, 14           ; restore current M
        x       0                ; from M(3,14)
        x       0                ; from M(3,14)
        xad     3, 15           ; restore A
        xad     3, 15           ; restore A
        ENDM
        ENDM
 
 

powered by: WebSVN 2.1.0

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