Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .setcpu "65C02"
- ACIA_DATA = $0000
- ACIA_STATUS = $0001
- ACIA_COMMAND = $0002
- ACIA_CONTROL = $0003
- .segment "VECTORS"
- .word nmi
- .word reset
- .word irq
- .code
- reset: jmp main
- nmi: rti
- irq: rti
- main:
- init_acia: lda #%00001011
- sta ACIA_COMMAND
- lda #%00011111
- sta ACIA_CONTROL
- ldx #33
- loop:
- wait_txd_empty: lda ACIA_STATUS
- and #$10
- beq wait_txd_empty
- txa
- sta ACIA_DATA
- inc
- cmp #127
- beq reset_counter
- tax
- ldy #$FF
- : cpy #0
- beq :+
- nop
- dey
- jmp :-
- :
- jmp loop
- reset_counter: ldx #33
- jmp loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement