›COMTAB = 10››DSKINV = $E453›CIOV = $E456››DDEVIC = $0300›DUNIT = $0301›DCOMND = $0302›DSTATS = $0303›DBUFLO = $0304›DBUFHI = $0305›DAUX1 = $030A›DAUX2 = $030B››IOCB = $0340›ICHID = $0340›ICDNO = $0341›ICCOM = $0342›ICSTA = $0343›ICBAL = $0344›ICBAH = $0345›ICPTL = $0346›ICPTH = $0347›ICBLL = $0348›ICBLH = $0349›ICAX1 = $034A›ICAX2 = $034B››› ORG $4000››;initilize x and y››START: LDX #0› LDY #63››;read in command string››STRIP: LDA (COMTAB),Y› INY› CMP #155› BNE STRIP1› JMP HLPSET›STRIP1: CMP #32› BNE STRIP››; check for special parm.››PARMCK: LDA (COMTAB),Y› INY› CMP #'/'› BEQ SPCMND›› STA $CB ;store this sp. val› CMP #'!' ; should we do › BEQ LOAD ; a cold start› ; when done?› STA $0600,X› INX››; load command into page 6››LOAD: LDA (COMTAB),Y› STA $0600,X› INY› INX› CMP #155› BNE LOAD› DEX› LDA #32› STA $0600,X› INX› LDA #155› STA $0600,X› ››;now send it to drive 9›;the sio2pc special drive››SEND: LDA #'W' ;WRITE› STA DCOMND› LDA #9› STA DUNIT› LDA #$80› STA DSTATS› LDA #$06 ;buf=page6› STA DBUFHI› LDA #$00› STA DBUFLO› JSR DSKINV ;Run It›› LDA #'!'› CMP $CB› BNE ENDPRG› JSR $E477››ENDPRG: RTS››; OTHER COMMANDS››; what command?››SPCMND: LDA (COMTAB),Y› CMP #'S'› BEQ STATUS› CMP #'s'› BEQ STATUS› JMP HELP›››STATUS: LDA #9 › STA DUNIT› LDA #$80› STA DSTATS› LDA #$06 ;buf=page6› STA DBUFHI› LDA #$00› STA DBUFLO› STA DAUX2 ;>sec#›› LDA #$06 ;buf=page6› STA ICBAH› LDA #$00› STA ICBAL› LDA #0› STA ICBLH››; put in a leading return›› LDA #1› STA ICBLL› LDA #155› STA $0600› LDA #$0B› STA ICCOM› LDX #0› JSR CIOV›››; get the status of each slot›› LDA #1› JSR GETIDS› LDA #2› JSR GETIDS› LDA #3› JSR GETIDS› LDA #4› JSR GETIDS› › RTS››; get status for slot # in A››GETIDS: STA DAUX1› LDA #'R'› STA DCOMND› JSR DSKINV››; find the lenth of the string and›; record it to ICBLL (the buf len)›; (ICBLH is set to 0)›› LDY #0›GETLOP: LDA $0600,Y› INY› CMP #32› BNE SPACE› JMP GETLOP››SPACE: CMP #155› BEQ GETDNE› TYA ; store loc.› TAX ; for later› JMP GETLOP››GETDNE: LDA $0600,X ; to avoid two› CMP #155 ; returns› BEQ GGTDNE› LDA #155› INX› STA $0600,X›GGTDNE: INX› STX ICBLL› ››; print status›› LDX #0› LDA #$0B ;put› STA ICCOM› JSR CIOV›› RTS››; print help screen››HELP: CMP #'C'› BEQ CMDSET› CMP #'c'› BEQ CMDSET››HLPSET: LDA #HLPTXT› STA ICBAH› LDA #$4C› STA ICBLL› LDA #$01› STA ICBLH› JMP DSPSET››CMDSET: LDA #CMDTXT› STA ICBAH› LDA #$88› STA ICBLL› LDA #$01› STA ICBLH››DSPSET: LDX #0› LDA #$0B ;put› STA ICCOM› JSR CIOV›› RTS››HLPTXT: db 155› db ' REMOTE | /[s?c]',155› db 155› db ' Sends a command string to SIO2PC',155› db ' or checks up on its drives.',155› db 155› db ' SIO2PC command string ',155› db ' to be send. Start it with a !',155› db ' to do a cold start afterwards',155› db 155› db ' /s displays status of drives',155› db ' /? displays this help screen',155› db ' /c displays a summery of the',155› db ' SIO2PC command set.',155› db 155› ›CMDTXT: db 155› db ' SIO2PC Command Set:',155› db 155› db ' C create disk (S or D)',155› db ' (disk#: 1 to 8) (size: 1 to 5)',155› db ' L load image (disk#)(pathname)',155› db ' X exchange disk (disk#)(disk#)',155› db ' U uninstall disk (disk#)',155› db ' W write disk to file (disk#) (name)',155› db ' I install file as disk (disk#)',155› db ' (pathname[/n for no uninstall])',155› db ' P print_thru (P/S/F[name])',155› db ' (EOL?[y:cr also?) (7bit?) (tab?)',155› db ' K lock data line',155› db ' J ultra speed toggle',155› db 155›