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

Subversion Repositories t48

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

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

Line No. Rev Author Line
1 12 arniml
        ;; *******************************************************************
2
        ;; $Id: test.asm,v 1.1.1.1 2004-03-25 22:29:17 arniml Exp $
3
        ;;
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
        add     a, #~009H + 1
24
        jnz     fail
25
 
26
call2:  call    goon2
27
 
28
        jmp     fail
29
 
30
goon2:  clr     c
31
        mov     a, psw
32
        add     a, #~00AH + 1
33
        jnz     fail
34
 
35
        ;; check stack contents
36
        mov     r0, #008H
37
        mov     a, @r0
38
        add     a, #(~(call1+2 & 0FFH) + 1) & 0FFH
39
        jnz     fail
40
 
41
        inc     r0
42
        mov     a, @r0
43
        add     a, #(~((call1+2) >> 8) + 1) & 0FFH
44
        jnz     fail
45
 
46
        inc     r0
47
        mov     a, @r0
48
        add     a, #(~(call2+2 & 0FFH) + 1) & 0FFH
49
        jnz     fail
50
 
51
        inc     r0
52
        mov     a, @r0
53
        add     a, #(~((call2+2) >> 8 | 080H) + 1) & 0FFH
54
        jnz     fail
55
 
56
pass:   PASS
57
 
58
fail:   FAIL

powered by: WebSVN 2.1.0

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