Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This is what I have _right now_. Here's what shows up in the serial port:
- ; Note: that $10BF (_eptr) is what used to be $109F; it's different because the code is different.
- ; 10BF
- ; FC
- ; 01F0: 00
- ; 01F1: 00
- ; 01F2: 00
- ; 01F3: 00
- ; 01F4: 00
- ; 01F5: 0F
- ; 01F6: 06
- ; 01F7: 4E
- ; 01F8: 10
- ; 01F8: 10
- ; 01F9: F9
- ; 01FA: FC
- ; 01FB: 66
- ; 01FC: 12
- ; 01FD: 31
- ; 01FE: C0
- ; 01FF: 10
- ; 0200: 00
- ; 0201: 00
- ; 0202: 00
- ; 0203: 00
- ; 0204: 00
- ; 0205: 00
- ; FC
- .import __RAM_START__
- .segment "EXEHDR"
- .addr __RAM_START__
- .addr main
- .include "io.inc"
- .include "macros.inc"
- .import leds_init
- .import leds_set_value
- .import acia_init
- .import acia_puts
- .import acia_putc
- .import acia_put_hex_byte
- .importzp acia_puts_ptr
- NMIVEC = $00
- IRQVEC = $02
- .zeropage
- leds_value: .res 1
- t1: .res 1
- t2: .res 1
- ptr1: .res 2
- .macro rti_jmp addr
- lda #>addr
- pha
- lda #<addr
- pha
- php
- rti
- .endmacro
- .macro f
- jsr acia_put_hex_byte
- lda #10
- jsr acia_putc
- .endmacro
- .macro f16 addr
- lda #>addr
- jsr acia_put_hex_byte
- lda #<addr
- jsr acia_put_hex_byte
- lda #':'
- jsr acia_putc
- lda #' '
- jsr acia_putc
- lda addr
- jsr acia_put_hex_byte
- lda #10
- jsr acia_putc
- .endmacro
- .code
- ;.proc main
- main:
- sei
- cld
- ldx #$FF
- txs
- ld16 IRQVEC, isr
- cli
- jsr leds_init
- jsr acia_init
- : lda SWITCH1
- and #1
- bne :-
- ld16 ptr1, $0100
- ldx #0
- ldy #0
- : lda #0
- sta (ptr1)
- inc16 ptr1
- iny
- bne :-
- inx
- cpx #3
- bne :-
- lda #>_eptr
- jsr acia_put_hex_byte
- lda #<_eptr
- jsr acia_put_hex_byte
- lda #10
- jsr acia_putc
- brk
- _eptr:
- loop:
- lda leds_value
- jsr leds_set_value
- inc leds_value
- ldx #$FF
- ldy #$FF
- jsr delay
- rti_jmp loop
- ;.endproc
- .proc isr
- tsx
- txa
- f
- f16 $01F0
- f16 $01F1
- f16 $01F2
- f16 $01F3
- f16 $01F4
- f16 $01F5
- f16 $01F6
- f16 $01F7
- f16 $01F8
- f16 $01F8
- f16 $01F9
- f16 $01FA
- f16 $01FB
- f16 $01FC
- f16 $01FD
- f16 $01FE
- f16 $01FF
- f16 $0200
- f16 $0201
- f16 $0202
- f16 $0203
- f16 $0204
- f16 $0205
- tsx
- txa
- f
- cli
- jmp _eptr
- : nop
- bra :-
- rti
- .endproc
- .proc delay
- : dex
- bne :-
- dey
- bne :-
- rts
- .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement