> SETPATH/SRC M Set SJCCP search path, and resave SJCCP to Acorn CPM disk system tracks : (A%=0:X%=1:os%=(&FFF4 &FF00)256: os%=6 >&8000:"Running Z80...":ș "OS_GetEnv" A$:"Z80 "+A$,A$," ",1+A$," "))): 2$unix%=os%=8:quit%=?&80<>0:?&80=0 < :" at line ";: F< mcode% &800:start%=&100:ver$="0.01":name$="SETPATH/CO" P: Z7OSWORD=&FFF1:CLICOM=&FFB9:PRTEXT=&FFB3:OSNEWL=&FFE7 d7PRHEX=&FFAA:PR2HEX=&FFAD:OSNEWL=&FFE7:DISKACC=&FFA4 n: x CPM Entries: bdos=5:DRIVE=4 ,bdos_string=9:bdos_open=15:bdos_close=16 "bdos_readseq=20:bdos_setdma=26 :  Memory locations: FCB1=&5C:FCB2=&6C:DMA=&80 : P=0 1 P%=start%:O%=mcode% [OPT P*3+4 JP Start .msgSyntax 2M "Syntax: SETPATH ":B 13:B 10  M "$" .msgBadDrive ,M "Bad drive (floppy only)":B 13:B 10 " M "$" ,.msgBadNumber 6M "Bad number":B 13:B 10 @ M "$" J .msgNotSJ TM "Not SJCCP":B 13:B 10 ^ M "$" h: r .errNotSJ |LD DE,msgNotSJ:JR errAbort .errBadNumber "LD DE,msgBadNumber:JR errAbort .errBadDrive !LD DE,msgBadDrive:JR errAbort .errSyntax LD DE,msgSyntax  .errAbort LD C,bdos_string: bdos LD SP,(AbortSP):RET  .AbortSP W 0 :  .Start 'N' :/ 15:PUSH AF:INC DE :\ Save drive D3 ReadDec:JR C,errBadNumber :\ Get user number N9LD A,C:CP 16:JR NC,errBadNumber :\ User must be 0..15 X7PUSH AF :\ Save user number b6LD A,(DRIVE): 15 :\ Get current drive l=CP 2:JR NC,errBadDrive :\ Only drive 0-1 allowed vBLD (Load_1),A:LD (Save_1),A :\ Set drive in control blocks 8LD HL,Load_1:Call DiskSectors :\ Load first sector 7LD HL,Buffer :\ HL=>start of CCP @LD DE,24:ADD HL,DE :\ HL=>start of "SJ" message $LD A,(HL):CP "S":JR NZ,errNotSJ  INC HL $LD A,(HL):CP "J":JR NZ,errNotSJ 7LD HL,Buffer :\ HL=>start of CCP .FindOffset =LD A,(HL):INC HL:INC HL:INC HL :\ Get byte, step to next ACP &C3:JR Z,FindOffset :\ Step though until not a JP 1LD E,A:ADD HL,DE :\ HL=>SEARCH 2POP AF:RLD:POP AF:RLD:LD A,(HL) :\ Store +DRV CLD DE,Buffer: A:SBC HL,DE :\ HL=offset from start of buffer OLD DE,(6):ADD HL,DE:LD DE,&F7FA :\ Point to SEARCH in current CCP in memory  KADD HL,DE:LD (HL),A :\ Store +DRV to take immediate effect .SaveBuffer  8LD HL,Save_1 :\ Save first sector *.DiskSectors 4JP DISKACC >: H .ReadDec R XOR A \.ReadDecLp fLD C,A:LD A,(DE) p*CP "!":CCF:RET NC :\ NC=Ok z1INC DE:CP ":":CCF:RET C :\ C=Bad Number 1SUB "0":RET C :\ C=Bad Number  LD B,10 .ReadDecAdd 3ADD A,C:RET C :\ C=Bad Number  DJNZ ReadDecAdd:JR ReadDecLp : 6.Load_1 :\ First two sectors of CCP #B 0 :\ Drive 0 ,W Buffer+0:W 0 :\ Will load to &D400 B 3:B &53 :\ !B 0 :\ Track "B 8 :\ Sector 'B &21 :\ One sectors  B &FF : 6.Save_1 :\ First two sectors of CCP $#B 0 :\ Drive 0 .,W Buffer+0:W 0 :\ Will load to &D400 8B 3:B &4B :\ WRITE B!B 0 :\ Track L"B 8 :\ Sector V'B &21 :\ One sectors ` B &FF j: tA.Buffer :\ CCP loaded to here to write to disk ~] : OA$="*Save "+name$+" "+~mcode%+" "+~O%+" FFFF0000 "+~(&FFF20000 start%)  " "A$: quit%: A$:*Quit