> USBDUMP # Needs to run in I/O processor : ( 128 2& M%(32),data% 31:usb_Init:ecs%=0 < F30 P"USB: DUMP INPUT/OUTPUT"' Z"S Sync"'"F Flush" d2"Z Short commands"'"X Extended commands"' n"H IPH : Hex" x"A IPA : Ascii" "1 QP1 : Query Port 1" "2 QP2 : Query Port 2" #"Cn SCx : Set Current Device" "Qn QDx : Query Device" ("R DRD : Read: Device Read Data" ("Wx DSD : Write: Device Send Data" & PRINT"Ux : Send SetUp data" "Tx SFx : Set FTDI" #"V QSS : Query Slave Status" "E E : Echo" 0A$=:"SFHAZX12CQRWUTVE",A$):do:usb_Sync   : do -(60)'(60)'(60)'(60)'11;11;11;11; " A$="S":usb_Sync: , A$="F":usb_Flush: 6$ A$="Z":usb_Cmd(&10):ecs%=0: @$ A$="X":usb_Cmd(&11):ecs%=1: J& A$="A":ecs%:usb_Cmd("IPA") : T$ A$="A": usb_Cmd(&90): ^& A$="H":ecs%:usb_Cmd("IPH") : h$ A$="H": usb_Cmd(&91): r& A$="1":ecs%:usb_Cmd("QP1") : |$ A$="1": usb_Cmd(&2B): & A$="2":ecs%:usb_Cmd("QP2") : $ A$="2": usb_Cmd(&2C):  A$="W":dsd:: &83 & A$="R":ecs%:usb_Cmd("DRD") : $ A$="R" :usb_Cmd(&84):  A$="Q":"QD";:B$=: 4 A$="Q":ecs%:usb_Cmd("QD "+B$) : - A$="Q": usb_Cmd(&85+" "+B$):  A$="C":"SC";:B$=: 4 A$="C":ecs%:usb_Cmd("SC "+B$) : - A$="C": usb_Cmd(&86+" "+B$):  A$="T":"SF";:B$=: 4 A$="T":ecs%:usb_Cmd("SF "+B$) : - A$="T": usb_Cmd(&87+" "+B$): $ A$="V":ecs%:usb_Cmd("QSS"): $ A$="V": usb_Cmd(&98): & A$="E":usb_Cmd("E"): 0' IF A$="U":PROCssu:ENDPROC:REM &9A : D: N: X#ݤh0(A%,N%)="0000000"+~A%,N%) b3ݤc0(A%):A%<32A%>126:"<"h0(A%,2)">"; A% l="" v:  > USBLib 1.00 :  USB access routines  =================== /usb_Sync:(?usb_S 128)=0:c0(?usb_D); (?usb_S 128): !usb_Flush:(?usb_S 128): <'"Flushing USB";::A%=?usb_D:c0(A%);:(?usb_S 128) $A%=+20:>A%:(?usb_S 128): Vݤusb_Err:?usb_result%=13 usb_result%?1=":":=0 "USB Error: "$usb_result%:= Ausb_Cmd(A$):129:0:usb_WrStr(A$+13):128:1:usb_RdStr: (ݤusb_Cmd(A$):usb_Cmd(A$):=usb_Err 3usb_WrStr(A$): A%=1 A$:(?usb_S 64)=0 +c0(A$,A%,1));:?usb_D=A$,A%,1)::  ?usb_RdStr:A%=usb_result%-1:A%=A%+1:?A%=usb_Rd:?A%=13: .usb_Wr(A%):(?usb_S 64)=0:?usb_D=A%:  ;ݤusb_Rd:A%:(?usb_S 128)=0:A%=?usb_D:c0(A%);:=A% *usb_Init 4usb_D=&FCF8:usb_S=&FCF9 >+usb_result%=usb_result%: usb_result%: H usb_result% 63,mc% 99 R P=0 1:P%=mc%:[OPT P*2 \.usb_RdData f'TAY:LDA #data% 255:STA usb_RdLp+4 p*LDA #data% 256:STA usb_RdLp+5:LDX #0 z5.usb_RdLp:JSR usb_Rd:STA data%,X:INX:BNE usb_RdLp 'INC usb_RdLp+5:DEY:BNE usb_RdLp:RTS 4.usb_Rd:BIT usb_S:BPL usb_Rd2:BIT &FF:BPL usb_Rd .usb_Rd2:LDA usb_D:RTS .usb_WrData 'TAY:LDA #data% 255:STA usb_WrLp+1 *LDA #data% 256:STA usb_WrLp+2:LDX #0 $.usb_WrLp:LDA data%,X:JSR usb_Wr 0.usb_WrLp2:LDA usb_D:BIT usb_S:BPL usb_WrLp2 INX:BNE usb_WrLp 'INC usb_WrLp+2:DEY:BNE usb_WrLp:RTS 4.usb_Wr:BIT usb_S:BVC usb_Wr2:BIT &FF:BPL usb_Wr .usb_Wr2:STA usb_D:RTS ]: :