jmp recieve ; wait for high on pra bit 0, min 10us wait_for_getit: getit: lda pra and #$01 cmp #$01 bne getit rts ; send high on pra bit 1 send_gotit: lda #2 sta pra waitforlow: lda pra and #$01 cmp #$00 bne waitforlow lda #0 sta pra rts ; set up DDRA, DDRB. PRB and PRB input, PRA bit 1 output setin: lda #$02 sta ddra lda #$00 sta ddrb ldx #$00 ldy #$00 rts recieve: ; Set input mode jsr setin ; Ignore bytes of address ldx #$05 skip: jsr Wait_for_getit jsr send_gotit dex bne skip startin: ; Pull in byte jsr wait_for_getit lda prb sta ($90),y ; Increment address pointer clc lda $90 adc #$01 sta $90 lda $91 adc #$00 sta $91 jsr send_gotit jmp startin brk