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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_1/] [sw/] [verif/] [white_box/] [int_on_mb1/] [test.asm] - Blame information for rev 292

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 194 arniml
        ;; *******************************************************************
2
        ;; $Id: test.asm,v 1.1 2005-10-31 10:05:13 arniml Exp $
3
        ;;
4
        ;; Test interrupt on code in Program Memory Bank 1.
5
        ;; => Bug report "Problem with INT and JMP"
6
        ;; *******************************************************************
7
 
8
        INCLUDE "cpu.inc"
9
        INCLUDE "pass_fail.inc"
10
 
11
test_byte:      equ     020h
12
 
13
        ORG     0
14
 
15
        ;; Start of test
16
        jmp     start
17
 
18
        ;; interrupt hits djnz instruction with opcode 0EAh
19
        ;; bus conflict results on interrupt vector address 002h
20
        ;; -> retr instruction placed here, so test finds FAIL
21
        retr
22
 
23
        ORG     3
24
        ;; interrupt executed
25
        mov     r0, #test_byte
26
        mov     a, #0ffh
27
        mov     @r0, a
28
        retr
29
 
30
start:
31
        ;; enable interrupt
32
        en      i
33
 
34
        ;; clear test byte
35
        mov     r1, #test_byte
36
        clr     a
37
        mov     @r1, a
38
 
39
        call    program_memory_bank_1
40
        sel     mb0
41
 
42
        ;; check if interrupt was successful
43
        mov     a, @r1
44
        jz      fail
45
 
46
 
47
pass:   PASS
48
 
49
fail:   FAIL
50
 
51
 
52
 
53
        ORG     0800H
54
program_memory_bank_1:
55
        ;; spend some time and wait for interrupt
56
        mov     r2, #020h
57
        djnz    r2, $
58
 
59
        ret

powered by: WebSVN 2.1.0

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