chrout = $ffd2 primm = $ff4f atnom = %00000100 clkom = %00000010 dtaom = %00000001 clkim = %01000000 dtaim = %10000000 defm = 0 size = $2f start = $2b count = $2d in = $fe ystr = $ff *=$05f5 st main jsr primm .text "WAITING FOR TRANSFER..." .byte 13,0 sei jsr bytein sta size jsr bytein sta size+1 jsr bytein sta run jsr bytein sta run+1 jsr bytein sta start sta count clc adc size sta e1 php jsr bytein sta start+1 sta count+1 plp adc size+1 sta e2 ldy count lda #0 sta count m2 jsr bytein sta (count),y iny bne m3 inc count+1 m3 e1 =*+1 cpy #0 bne m2 lda #'#' jsr chrout lda count+1 e2 =*+1 cmp #0 bne m2 m6 sty count cli jsr primm .byte 13 .text "BLOCK LOADED." .byte 13,0 lda run cmp #$fe bne m4 ldx run+1 cpx #$ff bne m4 rts m4 and run+1 cmp #$ff bne m5 jmp main m5 run =*+1 jsr $0000 jmp st bytein sty ystr ldy #3 b3 ldx #atnom lda #clkim b1 bit $01 bne b1 lda $01 stx $01 asl A rol in ldx #defm lda #clkim b2 bit $01 beq b2 lda $01 stx $01 asl A rol in dey bpl b3 ldy ystr lda in eor #$ff rts .end