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

Subversion Repositories leros

[/] [leros/] [trunk/] [asm/] [blink.asm] - Blame information for rev 10

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

Line No. Rev Author Line
1 3 martin
// Register definitions
2
 
3
//R0 = ?
4
//R1 = ?
5
//R2 = ?
6
 
7
// first instruction is not executed
8
        nop
9
// second instruction is executed twice
10
 
11
// A real blink in SW with 0.5 Hz
12
//      100.000.000 cycle loop
13
// 100 MHz clock, inner loop is 3 cycles
14
// inner loop 65635*3 = 196605
15
// outer loop 509 ca. 512 is ok
16
 
17
start:
18
        load 0
19
        loadh 2
20
        store r0
21
ll1:    load 255
22
        loadh 255
23
ll2:    sub 1
24
        nop             // we don't know yet about branch slot
25
        brnz ll2
26
        nop
27
        load r0
28
        sub 1
29
        store r0
30
        brnz ll1
31
        nop
32
 
33
        load 0
34
        out 0
35
 
36
        load 0
37
        loadh 2
38
        store r0
39
ll3:    load 255
40
        loadh 255
41
ll4:    sub 1
42
        nop             // we don't know yet about branch slot
43
        brnz ll4
44
        nop
45
        load r0
46
        sub 1
47
        store r0
48
        brnz ll3
49
        nop
50
 
51
        load 1
52
        out 0
53
 
54
        load 1
55
        nop
56
        brnz start
57
 

powered by: WebSVN 2.1.0

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