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

Subversion Repositories m65c02

[/] [m65c02/] [trunk/] [Src/] [M65C02-Test-Programs/] [M65C02_Tst5.a65] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 MichaelA
BROM_Start  equ     $F800
2
 
3
SPI_CR      equ     $F7FF
4
 
5
ZP_LED_Cntr equ     $00FD
6
ZP_Cntr_Lo  equ     $00FE
7
ZP_Cntr_Hi  equ     $00FF
8
 
9
            bss
10
;;
11
Zero_Page:  org     $0000
12
;;
13
Stack_Page: org     $0100
14
;;
15
RAM_Start:  org     $0200
16
;;
17
            code
18
            org     BROM_Start
19
;;
20
Start:      lda     #$00            ;; load initial value to control register
21
            sta     ZP_LED_Cntr
22
            sta     SPI_CR          ;; update LEDs
23
;;
24
Delay_Loop: ldy     #$04            ;; load outer delay loop counter
25
            sty     ZP_Cntr_Hi
26
;;
27
Delay_Lp1:  ldx     #$00            ;; load inner delay loop counter
28
            stx     ZP_Cntr_Lo
29
;;
30
;Delay_Lp2:  dex                     ;; decrement inner loop counter
31
Delay_Lp2:  dec     ZP_Cntr_Lo      ;; decrement inner loop counter
32
            bne     Delay_Lp2       ;; loop until inner loop counter is zero
33
;;
34
;            dey                     ;; decrement external loop counter
35
            dec     ZP_Cntr_Hi
36
            bne     Delay_Lp1       ;; loop until outer loop counter is zero
37
;;
38
;            dec     a               ;; decrement accumulator
39
            dec     ZP_LED_Cntr
40
            lda     ZP_LED_Cntr
41
            sta     SPI_CR          ;; update LEDs
42
 
43
            bra     Delay_Loop      ;; Loop Continously
44
;;
45
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46
;;
47
Last_Addrs:
48
;;
49
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
50
;;
51
;;  Vector Table
52
;;
53
Vect_Table: org     $FFFA
54
;;
55
            dw      Start       ;; NMI Interrupt Vector
56
            dw      Start       ;; Reset Vector
57
            dw      Start       ;; IRQ/BRK Interrupt Vector
58
;;
59
            end     Start

powered by: WebSVN 2.1.0

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