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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_0_4_beta/] [sw/] [verif/] [black_box/] [call/] [simple/] [test.asm] - Blame information for rev 292

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 arniml
        ;; *******************************************************************
2 34 arniml
        ;; $Id: test.asm,v 1.2 2004-03-29 20:09:47 arniml Exp $
3 12 arniml
        ;;
4
        ;; Test CALL addr with simple program.
5
        ;; *******************************************************************
6
 
7
        INCLUDE "cpu.inc"
8
        INCLUDE "pass_fail.inc"
9
 
10
        ORG     0
11
 
12
        ;; Start of test
13
        mov     a, psw
14
 
15
        clr     c
16
call1:  call    goon1
17
 
18
        jmp     fail
19
 
20
        ORG     039FH
21
 
22
goon1:  mov     a, psw
23 34 arniml
        anl     a, #~040H       ; mask AC, tested separately with DA
24 12 arniml
        add     a, #~009H + 1
25
        jnz     fail
26
 
27
call2:  call    goon2
28
 
29
        jmp     fail
30
 
31
goon2:  clr     c
32
        mov     a, psw
33 34 arniml
        anl     a, #~040H       ; mask AC, tested separately with DA
34 12 arniml
        add     a, #~00AH + 1
35
        jnz     fail
36
 
37
        ;; check stack contents
38
        mov     r0, #008H
39
        mov     a, @r0
40
        add     a, #(~(call1+2 & 0FFH) + 1) & 0FFH
41
        jnz     fail
42
 
43
        inc     r0
44
        mov     a, @r0
45 34 arniml
        anl     a, #~040H       ; mask AC, tested separately with DA
46 12 arniml
        add     a, #(~((call1+2) >> 8) + 1) & 0FFH
47
        jnz     fail
48
 
49
        inc     r0
50
        mov     a, @r0
51
        add     a, #(~(call2+2 & 0FFH) + 1) & 0FFH
52
        jnz     fail
53
 
54
        inc     r0
55
        mov     a, @r0
56 34 arniml
        anl     a, #~040H       ; mask AC, tested separately with DA
57 12 arniml
        add     a, #(~((call2+2) >> 8 | 080H) + 1) & 0FFH
58
        jnz     fail
59
 
60
pass:   PASS
61
 
62
fail:   FAIL

powered by: WebSVN 2.1.0

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