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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [Projects/] [opencores.org/] [Mos6502/] [sw/] [io_poll/] [io_poll.asm] - Blame information for rev 131

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 131 jt_eaton
 
2
   include  ../io_module/io_module.asm
3
 
4
 
5
 
6
 
7
             * = $c000  ; assemble start
8
               code
9
 
10
                   jmp    .nmi_vec             ;
11
 
12
                   jmp    .irq_vec             ;
13
 
14
 
15
.start             nop
16
                   ldx #00
17
                   ldy #00
18
                   lda io_base+io_gpio_0
19
                   sec
20
                   adc #00
21
                   sta io_base+io_gpio_0
22
                   lda io_base+io_gpio_0
23
                   sec
24
                   adc #00
25
                   sta io_base+io_gpio_0
26
 
27
 
28
 
29
 
30
                   lda #$c0
31
                   sta io_base+io_uart_cnt
32
                   lda #$42
33
                   sta io_base+io_uart_xmt
34
 
35
.lab_80            lda io_base+io_pic_int
36
                   sta io_base+io_gpio_1
37
                   and #$04
38
                   beq .lab_80
39
                   lda io_base+io_uart_rcv
40
                   sec
41
                   adc #01
42
                   sta io_base+io_uart_xmt
43
                   inc io_base+io_gpio_0
44
                   jmp .lab_80
45
 
46
 
47
 
48
 
49
.irq_vec           pha
50
                   txa
51
                   tax
52
                   pla
53
                   rti
54
 
55
.nmi_vec           pha
56
                   pla
57
                   rti
58
 
59
             * = $c3fa  ; vectors
60
 
61
 
62
     dw .nmi_vec               ;
63
     dw .start                 ;
64
     dw .irq_vec               ;
65
 
66
 code
67
 
68
 
69
 
70
 
71
 
72
 

powered by: WebSVN 2.1.0

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