!to"1551usb.prg",cbm t_lo = $ba t_hi = $bb blocks = $9f rest = $a0 s_lo = $a1 ; pointer lo s_hi = $a2 ; pointer hi ; drive 9 ; TIA 6523 porta = $fec0 ; data port portb = $fec1 ; pb0: st0 ; pb1: st1 portc = $fec2 ; pc6: ack ; pc7: dav ddra = $fec3 ddrb = $fec4 ddrc = $fec5 *=$6000 start: sei lda #%01000000 sta ddrc and #$00 sta portc sta ddra lda #$ff sta $FF0C sta $FF0D ; hide cursor ldx #$00 lda #$73 - sta $0800,x sta $0900,x sta $0a00,x sta $0b00,x inx bne - lda #$a3 sta $ff15 sta $ff19 lda #$00 tax tay sta t_lo lda #<mainscreen sta s_lo lda #>mainscreen sta s_hi lda #$0c sta t_hi - lda (s_lo),y sta (t_lo),y iny bne - ldy #$00 inc s_hi inc t_hi inx cpx #$04 bne - lda #$00 tax sta ddrb lda portb cmp #$03 bne notfound - lda interface+4,x ; interface found sta $0c00+259,x inx cpx #$07 bne - beq idler notfound: lda interface,x ; interface not found sta $0c00+259,x inx cpx #$0b bne notfound idler: ldx #$00 idle: lda portc cmp #$80 bne idle load: lda porta ; get pointer lo sta s_lo lda #$40 sta portc ; set ack (pc6) lda #$00 sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - lda porta ; get pointer hi sta s_hi lda #$40 sta portc ; set ack (pc6) asl sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - lda porta ; get blocks sta blocks lda #$40 sta portc ; set ack (pc6) asl sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - lda porta ; get load-addr lo sta t_lo lda #$40 sta portc ; set ack (pc6) asl sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - lda porta ; get load-addr hi sta t_hi lda #$40 sta portc ; set ack (pc6) asl sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - ; load prg ...go,go,go ... :) loadprg: lda porta ; get byte sta (t_lo),y ; save lda #$40 sta portc ; set ack (pc6) asl sta portc ; and delete ack - lda portc cmp #$80 ; wait for dav (pc7) bne - iny bne loadprg inx cpx blocks beq eot inc t_hi bne loadprg eot: jmp end end: cli rts mainscreen: !scr " CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC " !scr " 1551-usb " !scr " FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF " !scr " " !scr " " !scr " " !scr " usb-interface: " !scr " " !scr " CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " " !scr " CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC " !scr " " !scr " " interface: !scr "not found !"
Letzte Änderung: 2019-01-06 09:30:26