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

Subversion Repositories 8051

[/] [8051/] [trunk/] [asm/] [test.asm] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 simont
; test
2
;
3
; r0- counter
4
; r1, r2- delay
5
; r4- shift
6
 
7
   nop;
8
   nop;
9
   mov 90h,#0aah;
10
   mov R0,#01h;
11
   mov r5, #00h;
12
   mov 80h, #0fh;
13
 
14
d:
15
   nop;
16
   nop;
17
   nop;
18
   jz d;
19
   mov r4, #01h;
20
   mov 80h, #00h;
21
 
22
start:
23
   mov 90h, r4;
24
   nop;
25
   acall delay;
26
 
27
   mov 80h, r0;
28
   mov a,r5;
29
   nop;
30
   nop;
31
 
32
   jz up;
33
   inc r0;
34
   ajmp ed;
35
 
36
up:
37
   dec r0;
38
 
39
ed:
40
   mov a, r4;
41
   rr a;
42
   mov r4,a;
43
   nop;
44
   ajmp start;
45
   mov 80h,#11h;
46
 
47
 
48
delay:
49
   mov r1, #0ffh;
50
   mov r2, #0ffh;
51
z1:
52
   mov a, #0ffh;
53
z2:
54
   mov r1, a;
55
   mov a, r2;
56
   add a, #02h;
57
   mov a, r1;
58
   dec a;
59
   nop;
60
   nop;
61
   nop;
62
   nop;
63
   nop;
64
   nop;
65
   nop;
66
   nop;
67
   jnz z2;
68
   dec r2;
69
   mov a,r2;
70
   jnz z1;
71
   ret;
72
 
73
 
74
 
75
   .org 50h
76
   nop;
77
   mov a, #01;
78
   mov r5, #00h
79
   nop;
80
   nop;
81
   reti;
82
 
83
   .org 65h
84
   nop;
85
   mov r5, #0fh
86
   mov a, #01;
87
   nop;
88
   nop;
89
   reti;

powered by: WebSVN 2.1.0

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