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

Subversion Repositories 8051

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 60 simont
    ajmp start;
2
 
3
check:
4
    subb a, #04;
5
    jnz error1;
6
    mov a, b;
7
    jnz error2;
8
    ret;
9
 
10
error1:
11
    mov p1, #01;
12
    ajmp error1;
13
 
14
error2:
15
    mov p1, #02;
16
    ajmp error2;
17
 
18
    .org 020eh
19
start:
20
    mov p0, #090h;
21
    mov a, #20;
22
    mov b, #05;
23
    div ab;
24
    lcall check;
25
    mov p0, #00h;
26
    ljmp test1;
27
 
28
    .org 500dh;
29
test1:
30
    mov a, #00;
31
    mov b, #00;
32
    mov r0, a;
33
    mov r1, #30h
34
    mov dptr, #data;
35
loop1:
36
    mov a, r0;
37
    movc a, @a+dptr;
38
    mov @r1, a;
39
    inc r0;
40
    inc r1;
41
    mov a, r0;
42
    subb a, #25;
43
    jnz loop1;
44
 
45
    mov p0, #01h;
46
 
47
    mov r0, #00h;
48
    mov r1, #30h;
49
    mov b, #05;
50
 
51
loop2:
52 91 simont
    clr c;
53 60 simont
    mov a, @r1;
54
    subb a, b;
55
    jnz error3;
56
    inc b;
57
    inc r1;
58
    inc r0;
59
    mov a, r0;
60
    subb a, #25;
61
    jnz loop2;
62
 
63
    mov p0, #002h;
64
    ljmp _end;
65
 
66
 
67
error3:
68
    mov p1, #03;
69
    ajmp error3;
70
 
71
    .org 800fh;
72
_end:
73
    mov p0, #0eeh;
74
    ajmp _end;
75
 
76 91 simont
    .org 9000h;
77 60 simont
data:
78
    .db 5;
79
    .db 6;
80
    .db 7;
81
    .db 8;
82
    .db 9;
83
    .db 10;
84
    .db 11;
85
    .db 12;
86
    .db 13;
87
    .db 14;
88
    .db 15;
89
    .db 16;
90
    .db 17;
91
    .db 18;
92
    .db 19;
93
    .db 20;
94
    .db 21;
95
    .db 22;
96
    .db 23;
97
    .db 24;
98
    .db 25;
99
    .db 26;
100
    .db 27;
101
    .db 28;
102
    .db 29;
103
    .db 30;
104
    .db 31;
105
 

powered by: WebSVN 2.1.0

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