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

Subversion Repositories 8051

[/] [8051/] [trunk/] [asm/] [r_bank.asm] - Blame information for rev 186

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 simont
        ajmp start              ;
2
;
3
; testing bank register select
4
;
5
error:
6
        mov p1, psw             ;
7
loop:
8
        nop             ;
9
        nop             ;
10
        ajmp loop               ;
11
 
12
start:
13
        clr a
14
        mov r0, a               ; bank 0
15
        mov r4, #040h           ;
16
        mov psw, #008h          ; bank 1
17
        mov r0, #001h           ;
18
        mov r4, #041h           ;
19
        mov psw, #010h          ; bank 2
20
        mov r0, #002h           ;
21
        mov r4, #042h           ;
22
        mov psw, #018h          ; bank 3
23
        mov r0, #003h           ;
24
        mov r4, #043h           ;
25
 
26
        mov p0, #00h            ;
27
 
28
        mov psw, #010h          ; bank 2
29
        mov a, r0               ;
30
        subb a, #002h           ;
31
        jnz error               ;
32
        mov a, r4               ;
33
        subb a, #042h           ;
34
        jnz error               ;
35
 
36
        mov p0, #01h            ;
37
 
38
        mov psw, #008h          ; bank 1
39
        mov a, r0               ;
40
        subb a, #001h           ;
41
        jnz error               ;
42
        mov a, r4               ;
43
        subb a, #041h           ;
44
        jnz error               ;
45
 
46
        mov p0, #02h            ;
47
 
48
        mov psw, #018h          ; bank 3
49
        mov a, r0               ;
50
        subb a, #003h           ;
51
        jnz error               ;
52
        mov a, r4               ;
53
        subb a, #043h           ;
54
        jnz error               ;
55
 
56
        mov p0, #03h            ;
57
 
58
        mov psw, #000h          ; bank 0
59
        mov a, r0               ;
60
        jnz error               ;
61
        mov a, r4               ;
62
        subb a, #040h           ;
63
        jnz error               ;
64
 
65
        mov p0, #04h            ;

powered by: WebSVN 2.1.0

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