ô > SJCCP/SRC +ô SJ Research CCP as supplied with ZNOS 1ô Source recreated and tweeked by J.G.Harston (: 2:start%=&D800 :ô Start address, ZNOS=&D800, Acorn=&D400 <$jsc%=£ :ô Original JSC version F#sj%=¹ :ô Amended to 'SJCCP' P5znos%=¹ :ô Allowed to use workspace within ZNOS Z+bbc%=¹ :ô BBC entry points available d: n,start%=&D400:jsc%=£:sj%=¹:znos%=£:bbc%=¹ x: ‚CDRIVE=4:BDOS=5:OSBYTE=&FFF4:OS_CLI=&FFF7:BRKV=&FFFA:FAULT=&FF82 Œ5ݤopt(A%):o%=(P%-z%)€A%:P%=P%-o%:O%=O%-o%:=P*p%+4 –:  p%=3:Þ mcode% &900 ª ã P=0 ¸ 1 ´O%=mcode%:P%=start% ¾[OPT P*p%+4 ÈBJP ColdEntry :\ Execute any command in InputBuffer Ò?JP WarmEntry :\ Clear InputBuffer and start CCP Ü.z% æGJP ResetCCP :\ Standard CCP must have only two entries ð;OPT ¤opt(¬jsc%) :\ Remove if not original version ú7.InputBuffer:ÝB &7F :\ Input buffer maximum size :.InputLength:ÝB &00 :\ Input buffer length, 0=empty .InputText :ÝM Ä16," ") .z%:ÝM "S":OPT ¤opt(¬sj%) "&ÝM "JCCP version 1.40":ÝB 13:ÝB 10 ,G.z%:ÝM "Another quality product from JSC wundersystems":ÝB 13:ÝB 10 6OPT ¤opt(¬jsc%) @ ÝM "$" J!.z%:ÝM "(C)SJ Research 1984." TOPT ¤opt(¬sj% € ¬jsc%) ^: h6ÝM Ästart%+&C1+37*¬znos%-P%,½0) :\ Tweekable space r: | .entry% †0LD C,0:JR ColdEntry :\ Enter here if *ù �5.CCPstack :\ Top of internal stack š7.LD8CD :ÝB &04 :\ Number of columns for DIR ¤A.LD8CE :ÝB &01 :\ Drive to search if object not found ®?.LD8CF :ÝB &00 :\ Bad Filename flag in ReadFilename ¸.escflg:ÝB 1 Â.addr :ÝW 0 Ì.ccpdrv:ÝB &00 Ö: à$\ ------------------------------ ê$\ Restart CCP with current drive ô$\ ------------------------------ þ .ResetCCP 6LD A,(DRIVE):LD C,A :\ Get current drive/user : !\ --------------------------- &\ C=drive to start with 0!\ No startup command executed :!\ --------------------------- D.WarmEntry N2SUB A:LD (InputLength),A :\ Clear input buffer X: b+\ ------------------------------------- l\ C=drive to start with v+\ Input buffer contains startup command €+\ ------------------------------------- Š.ColdEntry ”BLD SP,CCPstack:PUSH DE :\ set up stack and save startup flag ž.z% ¨;LD HL,ErrorHandler:LD (BRKV),HL :\ set up error handler ²OPT ¤opt(¬bbc%) ¼7LD HL,DRIVE:LD (HL),C :\ store user/drive number Æ.LD C,&D:Ö callBDOS :\ reset disk system Ð5\LD (BATCH),A :\ Set '$*.*' found flag Ú8SUB A:RLD:LD E,A:RRD :\ get user code from DRIVE ä*Ö GetSetUser :\ Set user code î>LD HL,(LF204):LD (addr),HL :\ save BIOS warm start address ø:LD HL,LD922:LD (LF204),HL :\ redirect BIOS warm start 7LD C,&F:Ö SubmitBDOS :\ Try to open '$$$.SUB' file  >INC A:LD (BATCH),A :\ Set batch file active/inactive  .LD922  /LD SP,CCPstack :\ Reset CCP stack *ALD HL,(addr):LD (LF204),HL :\ restore BIOS warm start address 44PUSH AF:Ö PrNewline :\ Print newline if needed >=POP AF:JR NZ,LD92B :\ No title if batch file active H-Ö vers:Ö cr_lf :\ Display CCP version R .LD92B \GÖ add_CR:JP ExecInput :\ Execute any command and enter command loop f: p .commands zÝM "DIR" :NOP:ÝW dir „ÝM "TYPE" :NOP:ÝW type ŽÝM "ERA" :NOP:ÝW era ˜ÝM "REN" :NOP:ÝW ren ¢ÝM "SAVE" :NOP:ÝW save ¬ÝM "USER" :NOP:ÝW user ¶ÝM "LOAD" :NOP:ÝW load ÀÝM "GO" :NOP:ÝW go ÊÝM "VDU" :NOP:ÝW vdu ÔÝM "PRINT":NOP:ÝW print ÞÝM "OLD" :NOP:ÝW old èÝM "RUN" :NOP:ÝW run òÝM "RESET":NOP:ÝW ResetCCP üÝM "VERS" :NOP:ÝW vers NOP : .\ ---------------------------------------- $.\ VERS - Print CCP and ZNOS version string ..\ ---------------------------------------- 8 .title B*.z%:ÝM "S" :OPT ¤opt(¬sj%) L2ÝM "JCCP version 1.40" :OPT ¤opt(¬sj% € ¬jsc%) V ÝM "$" `: j .vers t2LD DE,title:Ö PrMessage :\ Print out CCP title ~4LD C,&4A:Ö BDOS :\ Get ZNOS version string ˆ,LD A,H:„ L:RET Z :\ HL=0, no ZNOS ’HEX DE,HL:JP PrMessage :\ Print out ZNOS version string and return œ: ¦\ ------------- °\ Error handler º\ ------------- Ä.ErrorHandler Î.z% Ø:LD SP,CCPstack:Ö cr_lf:\ Reset stack and print newline â:LD HL,(FAULT) :\ Get address of error block ì .err_lp ö?INC HL:LD A,(HL) :\ Get character from error string -„ A:Ö NZ,PrChar :\ Print if not zero  7JR NZ,err_lp:Ö cr_lf :\ Loop until zero terminator OPT ¤opt(¬bbc%) : ( .LD9D3 2.z% <zero, print it �OPT ¤opt(¹) š.z% ¤.Ö PrDec :\ Print user number ®OPT ¤opt(£) ¸4LD C,&4A:Ö BDOS :\ Get ZNOS version string Â:LD A,L:„ H:LD A,—">" :\ If no version string, use '>' Ì=JR Z,prompt:LD A,—"]" :\ Version string present, use ']' Ö .prompt à?Ö PrChar :\ If ZNOS, print A], if not print A> ê4Ö LDA5D:Ö cr_lf :\ Read a line to InputBuffer ô: þ.ExecInput 9SUB A:LD (InputLength),A :\ Flag InputBuffer as empty -Ö ResetDMA :\ Set DMA to &0080 7Ö ExecLine:JR MainLoop:\ Execute line and loop back &: 0-\ --------------------------------------- :-\ Delete $$$.SUB and read a line of input D-\ --------------------------------------- N .LDA5A X6Ö LDAA9 :\ Delete any '$$$.SUB' file b: l5\ ----------------------------------------------- v5\ Read a line of input from console or batch file €5\ ----------------------------------------------- Š .LDA5D ”=LD A,(BATCH) :\ Is there a batch file active? žD„ A:JR NZ,LDA78 :\ Jump to read a record from batch file ¨LD DE,InputBuffer ²>LD C,&A:Ö BDOS :\ Read a line of input from console ¼: Æ .add_CR Ð4LD HL,InputLength :\ Point to line length Ú5LD E,(HL):LD D,0 :\ Get input line length ä:ADD HL,DE:INC HL :\ Point to end of input line î5LD (HL),13:RET :\ Put CR at end of text ø: -\ ---------------------------------------  -\ Read a record from '$$$.SUB' batch file -\ ---------------------------------------  .LDA78 *>LD DE,InputLength :\ Set DMA address to InputBuffer 4,Ö SetDMA:LD A,(LF243) :\ Get RecordCount >JDEC A:JP M,LDA5A :\ No more, delete $$$.SUB, read from console H9PUSH AF:LD (LF254),A :\ Set record number to read R(LD C,&14:Ö SubmitBDOS :\ Read record \HÖ add_CR:LD HL,InputText :\ Add CR and point HL to start of text f .LDA98 p;LD A,(HL):CP 13:Ö NZ,PrChar :\ Display text to console z/INC HL:JR NZ,LDA98 :\ Loop until „8Ö LDE19:POP AF :\ Check for keypress to abort ŽELD (LF243),A:RET NZ :\ Set RecordCount, return if not at end ˜: ¢ .LDAA9 ¬9LD A,(BATCH):„ A:RET Z :\ No batch file, just return ¶PUSH DE:LD C,&13 À-Ö SubmitBDOS :\ Delete '$$$.SUB' Ê:SUB A:LD (BATCH),A :\ Set 'no batch file active' ÔPOP DE:RET Þ: è)\ ----------------------------------- ò)\ Execute command line in InputBuffer ü)\ -----------------------------------  .ExecLine  = ,) ì&SUB A :\ at end ö .not_end ?CP (HL):JR NZ,no_match :\ Doesn't match, try next command 8INC HL:„ A:JR NZ,comm_lp2 :\ Check another character 5LD A,(HL):INC HL:LD H,(HL) :\ Get command address 6LD L,A:LD A,C:JP (HL) :\ Enter with A=character ( .no_match 27LD A,(HL):„ A:INC HL :\ Find end of command text <4JR NZ,no_match :\ Loop until zero byte FHINC HL:INC HL:JR comm_lp :\ Step past address and check next command P: Z"\ ---------------------------- d"\ Try to run command from disk n"\ ---------------------------- x .comm_end ‚3Ö read_filename :\ Parse filename to FCB1 Œ:PUSH DE:LD DE,&65 :\ Point to extension in FCB1 –;LD HL,com_txt:LD BC,3:LDIR :\ Force extension to '.COM'  ?POP DE:LD A,(&5D) :\ Get first character of filename ª6CP —" ":JP NZ,run_comm :\ If command there, run it ´: ¾/\ ----------------------------------------- È/\ No filename, see if drive specifier given Ò/\ ----------------------------------------- Ü8LD A,(&5C):DEC A:RET M :\ No drive given, exit æ*LD E,A:LD C,&E:Ö callBDOS :\ Set drive ð7LD HL,DRIVE:LD A,(HL) :\ Get user from DRIVE ú<€ &F0:„ E:LD (HL),A:RET :\ Merge with drive and return :  .com_txt 9ÝM "COM" :\ Extension for command files ": ,2.PrMessage :\ Print string at DE 6Ö PrString:JR cr_lf @: J7.PrNewline :\ Print newline if needed T.z% ^4LD A,&86:Ö OSBYTE :\ Get cursor X,Y position h3LD A,L:„ A:RET Z :\ Return if not needed rOPT ¤opt(¬bbc%) |-.cr_lf :\ Print newline †LD A,13:Ö PrChar �LD A,10:JR PrChar š2.PrDec :\ Print A in decimal ¤ LD B,&FF ® .PrDecLp ¸INC B:SUB 10:JR NC,PrDecLp ÂLD C,A:LD A,B Ì„ A:Ö NZ,pr_digit ÖLD A,C:ADD A,10 à .pr_digit êADD A,—"0" ô .PrChar þPUSH AF:PUSH BC:PUSH DE LD E,A:LD C,2:Ö callBDOS POP DE:POP BC:POP AF:RET : & .LDB64 0 LD HL,&5C : .LDB67 DPUSH HL:Ö read_filename2 NLD C,A:POP HL:INC HL XLD A,(HL):CP —" " b*LD A,C:RET NZ:\ Ok if filename present l .LDB73 v$Ö abort:ÝM "Syntax error":ÝM "$" €.read_filename Š LD HL,&5C ”.read_filename2 žPUSH HL:POP IX:\ copy to IX ¨LD (IX+0),0:LD (IX+&20),0 ² LD B,11 ¼ .LDB93 ÆLD (IX+1),—" " ÐINC IX:DJNZ LDB93 Ú LD B,4 ä .LDB9D î!LD (IX+1),0:INC IX:DJNZ LDB9D øPUSH DE:Ö get_upper JR C,LDBD5 LD C,A:Ö get_char -CP —":":JR NZ,LDBBA:\ not drive specifier LD A,&3F:€ C:LD (HL),A *$INC SP:INC SP:\ lose old pointer 4 PUSH DE > .LDBBA HPOP DE:INC HL:PUSH HL R LD B,9 \ .LDBBF fÖ get_upper:JR C,LDBD5 pJR NZ,LDBC8 zPOP HL:RET:\ end „ .LDBC8 ŽCP —".":JR Z,LDBD8 ˜.CP —"*":Ö Z,LDC07:\ if '*', fill with '?'s ¢ LD (HL),A ¬INC HL:DJNZ LDBBF ¶ .LDBD5 À&POP HL:JR LDBEE:\ Illegal filename Ê .LDBD8 Ô POP HL Þ*LD BC,8:ADD HL,BC:\ point to extension è LD B,4 ò .LDBDF üÖ get_upper JR C,LDBEE:\ illegal RET Z:\ end CP —"*":Ö Z,LDC07:\ '*' $LD (HL),A:INC HL .DJNZ LDBDF 8 .LDBEE B1LD A,(LD8CF):„ A:RET NZ:\ no error if flagged L .LDBF3 V(Ö abort:ÝM "Illegal filename":ÝM "$" ` .LDC07 jLD A,—"?":DEC B tJR Z,LDC12 ~ .LDC0C ˆLD (HL),A:INC HL ’DJNZ LDC0C œDEC HL:INC B ¦ .LDC12 ° INC B:RET º: Ä .get_char ÎLD A,(DE):CP 13:RET Z Ø€ &5F:CP —"A" âJR C,LDC22 ìCP —"[":JR C,LDC23 ö .LDC22  LD A,(DE)  .LDC23 INC DE:RET : (.get_upper 2Ö get_char <CP 13:RET Z FCP —",":RET Z PCP —"=":RET Z ZCP —" ":RET NZ dPUSH AF:Ö SkipSpace nPOP AF:RET x.SkipSpace ‚LD A,(DE):CP —" " Œ RET NZ –INC DE:JR SkipSpace  : ª .callBDOS ´PUSH DE:PUSH HL:Ö BDOS ¾POP HL:POP DE:RET È: Ò%\ ------------------------------- Ü%\ DIR - List objects in catalogue æ%\ ------------------------------- ð.dir ú3Ö read_filename :\ Parse filename to FCB1 9SUB A:LD (LDD06),A :\ Set 'drive not specified' =LD HL,&5D:LD A,(HL) :\ Get first character from FCB1 0, use specified drive r .LDC80 |7LD (LDD06),A :\ Set drive to &00 or '?' †1LD A,(ccpdrv) :\ Get current drive � .LDC86 š5ADD A,—"@":LD (LDD05),A:\ Convert to drive letter ¤-LD C,&11:Ö LDC50 :\ Search for first ®8INC A:RET Z:LD C,1 :\ If nothing found, return ¸:  .LDC96 Ì;PUSH BC:Ö LDE19 :\ Check for keypress interuption ÖEDEC A :\ A=index into current directory record à0RRCA:RRCA:SCF:RRA :\ A=&0080+index*32 êALD L,A:LD H,0 :\ HL points to this directory entry ôGBIT 7,(HL):JR NZ,LDCF1 :\ If UserNum.b7=1, no entry, skip to next þ5LD A,(LDD06) :\ Check drive specified >„ A:JR NZ,LDCB5 :\ If '?', skip check for È™ files -.Pr2Space:Ö PrSpace :\ Print two spaces H .PrSpace RPUSH AF:LD A,32 \(Ö PrChar:POP AF:RET :\ Print space f: p,.LDD05:DEC HL :\ Drive letter z<.LDD06:ÝB &CD :\ Drive 0=current, <>0=specified „: Ž \ -------------------------- ˜\ Í - Save memory to disk ¢ \ -------------------------- ¬ .LDD07 ¶&Ö abort:ÝM "Catalogue full":ÝM "$" À: Ê .save ÔÖ ReadDec:PUSH BC ÞÖ LDB64:Ö ReadHex è PUSH HL òLD C,&13:Ö LDC41 ü"LD C,&16:Ö LDC50:\ create file INC A:JR Z,LDD07:\ Cat full POP DE:\ start POP HL:\ length $SUB A:LD H,A .!CP L:JR Z,LDD60:\ zero length 8'ADD HL,HL:\ =num of 128-byte blocks BLD A,(&5C) L/CP &10:JR Z,LDD65:\ direct ENDIFs available V .LDD40 ` PUSH HL j(LD (addr),DE:Ö SetDMA:\ Set DMA addr t&LD C,&15:Ö LDC50:\ write 128 bytes ~„ A:JR NZ,LDD75:\ Disk full ˆLD HL,(addr) ’ LD DE,128 œADD HL,DE:EX DE,HL ¦POP HL:DEC HL °LD A,H:„ L:JR NZ,LDD40 º .LDD60 Ä"LD C,&10:JP LDC50:\ close file Î .LDD65 Ø#PUSH HL:Ö SetDMA:\ Set DMA addr â POP IX ìLD C,&59:Ö LDC50:\ save ö„ A:JR Z,LDD60:\ ok  .LDD75  !Ö abort:ÝM "Disc full":ÝM "$" : 1\ ------------------------------------------- (1\ Perform action if filename has no wildcards 21\ ------------------------------------------- < .LDC41 F?PUSH BC:LD HL,&5C :\ Save call number, point to FCB1 P5LD BC,12:LD A,—"?" :\ Search 12 bytes for '?' ZDCPIR:POP BC:JP Z,LDBF3 :\ If found, jump to 'Illegal filename' d .LDC50 nCLD DE,&5C:JR JumpBDOS :\ Point to FCB1, call BDOS and return x: ‚<.ResetDMA :LD DE,&80 :\ Set DMA to &0080 Œ9.SetDMA :LD C,&1A:JR JumpBDOS :\ Set DMA to DE –H.SubmitBDOS:LD DE,SUBFCB:JR JumpBDOS :\ Call BDOS pointing to SUBFCB  >.PrString :LD C,9:JR JumpBDOS :\ Print string at DE ª: ´\ ----------------------- ¾\ USER - Select user area È\ ----------------------- Ò .user Ü/Ö ReadDec:LD A,C :\ Read decimal value æ-CP &20:JR NC,BadNumber :\ If >31, error ð or @CP 10:JR NZ,type_last :\ Not or , type character  .type_cr **Ö cr_lf:JR type_last :\ Print newline H.type_char R,LD A,C:Ö PrChar :\ Print character \.type_last f4LD A,C:LD (addr),A :\ Set last chararacter p.type_skip z/Ö LDE22 :\ Check for keypress „6PUSH AF:Ö NZ,LDD60 :\ Close file if key pressed Ž4POP AF:JP NZ,LD9E5 :\ Abort if key pressed ˜EINC HL:DJNZ type_lp :\ Point to next character and loop back ¢:JR LDDE8 :\ Loop for another 128 bytes ¬: ¶ .LDE19 À/PUSH AF:Ö LDE22 :\ Check for keypress Ê:JP NZ,LD9E5:POP AF:RET :\ Close batch file and abort Ô .LDE22 Þ.PUSH BC:PUSH DE:PUSH HL :\ Save registers è/LD C,&B:Ö BDOS :\ Get Console Status ò4„ A:JR Z,LDE37 :\ Nothing pending, exit ü.LD C,1:Ö BDOS :\ Get Console Input 1SUB A:DEC A :\ A=&FF for aborted  .LDE37 1POP HL:POP DE:POP BC :\ Restore registers $RET .: 8\ ----------------- B\ ERA - Erase files L\ ----------------- V .era_txt `&ÝM "Erase all files (Y/N)?":ÝM "$" j.era tÖ LDB64:LD A,—"?" ~LD B,11:LD HL,&5C ˆ .LDE60 ’INC HL:CP (HL) œJR NZ,LDE79:DJNZ LDE60 ¦LD DE,era_txt °Ö PrString ºÖ LDA5D:Ö get_char Ä€ &DF:CP —"Y":JP NZ,LD9E8 Î Ö cr_lf Ø .LDE79 âLD C,&13:Ö LDC50 ìINC A:JP Z,LDFCF öRET :  \ ----------------- \ REN - Rename file \ ----------------- (.ren 21LD HL,&6C:Ö LDB67 :\ Parse first filename <2PUSH AF:Ö LDB64:POP AF:\ Parse second filename F1CP —"=":JR Z,ren2 :\ REN newname=oldname P>CP —" ":JP NZ,LDB73 :\ Error if not REN oldname newname Z7LD HL,&5C:LD DE,&6C:LD B,16 :\ Prepare to swap FCBs d .ren1 n2LD A,(DE):LD C,(HL) :\ Get bytes from FCB x3LD (HL),A:LD A,C:LD (DE),A :\ Swap them around ‚5INC HL:INC DE:DJNZ ren1 :\ Loop for all 16 bytes Œ .ren2 –4LD C,&11:LD DE,&6C:Ö BDOS:\ See if newname exits  ?INC A:JR Z,LDEB3 :\ newname doesn't exist, go ahead ª+Ö abort:ÝM "File already exists":ÝM "$" ´ .LDEB3 ¾*LD C,&17:Ö LDC41 :\ Do the rename È9INC A:JP Z,LDFCF:RET :\ Error if source not found Ò: Ü .NFtxt æÝM " not found":ÝM "$" ð: ú\ ----------------------- \ ù - Run arbitary file \ ----------------------- .run "2Ö read_filename :\ Read filename to FCB1 ,?LD A,(&5D) :\ Get first character of filename 6@CP —" ":JR Z,old :\ No filename, enter current program @: J,\ -------------------------------------- T,\ Run a command file from command prompt ^,\ -------------------------------------- h .run_comm rPUSH DE:LD HL,&100 |6Ö LDF3D:POP DE :\ Load file in FCB1 to &100 †: �5\ ----------------------------------------------- š3\ Ë - Enter current program with new parameters ¤5\ ----------------------------------------------- ®.old ¸1PUSH DE:Ö LDF16 :\ Close any batch file Â-Ö ResetDMA:POP DE :\ Set DMA to &0080 Ì .LDEEA ÖBPUSH DE :\ Save address of command parameters à@LD A,&FF:LD (LD8CF),A :\ Prevent errors fron ReadFilename ê8Ö read_filename :\ Read first filename to FCB1 ô-LD HL,&6C :\ Point to FCB2 þ9Ö read_filename2 :\ Read second filename to FCB2 APOP DE :\ Get address of command parameters 9LD HL,&80:PUSH HL :\ Point to parameter buffer =LD B,&FF:LD A,(DE) :\ Get character from input text &@CP 13:JR Z,LDF06:DEC DE :\ Step back to prepare for GetChar 0 .LDF06 :<Ö get_char :\ Get a character from input line DGINC HL:LD (HL),A:INC B :\ Store in parameter buffer and inc count N/SUB &0D:JR NZ,LDF06 :\ Loop until X?LD (HL),A:POP HL :\ Store at end of parameters bJLD (HL),B:JP &100 :\ Store parameter length and execute program l: v .LDF16 €;LD A,(BATCH):„ A:RET Z :\ No batch file active, return Š.PUSH DE:PUSH HL :\ Save registers ”.LD HL,LF242:RES 7,(HL) :\ Reset b7 of S2 ž'LD C,&10:Ö SubmitBDOS :\ Close file ¨.LDF3D:\ load a file HPUSH HL:EX DE,HL R)Ö SetDMA :\ Set DMA addr \LD HL,&62:SET 7,(HL) f .LDF49 p0LD C,&5A:Ö LDC50 :\ Attempt direct load z<„ A:JR Z,LDF59 :\ Not supported, do manual load „8INC A:Ö Z,LDFB8 :\ Not found, try search drive Ž6JR Z,LDF49 :\ Jump back to try again ˜POP HL:RET ¢: ¬ .LDF59 ¶.LD C,&F:Ö LDC50 :\ Open file in FCB1 À=INC A:Ö Z,LDFB8 :\ If not found, try changing drive ÊEJR Z,LDF49:POP DE :\ Another drive found, jump back to try Ô .LDF65 ÞELD (addr),DE:Ö SetDMA :\ Save current address and set DMA address è=LD C,&14:Ö LDC50 :\ Read a record to current address òA„ A:JR NZ,LDF80 :\ Jump to finish when at End Of File ü3LD HL,(addr) :\ Get current address ?LD DE,&80:ADD HL,DE :\ Update to next 128-byte address 9EX DE,HL:JR LDF65 :\ Loop back for next record  .LDF80 $5JP LDD60 :\ Close file and return .: 8 .ReadHex BLD HL,&100:\ default value L LD A,(DE) VCP 13:Ö NZ,LDF94 `CP 13:RET Z j JP LDB73 t .LDF94 ~ LD HL,0 ˆ .LDF97 ’Ö get_upper:RET Z œ SUB —"0" ¦ .LDF9D °JP C,BadNumber ºCP 10:JR C,LDFAB Ä SUB 7 ÎCP &10:JP NC,BadNumber Ø .LDFAB â PUSH BC ì LD B,4 ö .LDFAE ADD HL,HL:JR C,LDF9D  DJNZ LDFAE POP BC:„ L:LD L,A  JR LDF97 (: 2 .LDFB8 <3LD HL,&5C:LD A,(HL) :\ Get drive from FCB1 FN„ A:JR NZ,LDFCF :\ If drive specified, print 'not found' and abort P6LD A,(ccpdrv):LD B,A :\ Get current drive to B Z-LD A,(LD8CE) :\ Get something dC„ A:JR Z,LDFCF :\ If zero, print 'not found' and abort nOCP B:JR Z,LDFCF :\ If same as current drive, 'not found' and about xCLD (HL),A:CP A:RET :\ Store in FCB1 and return with Z set ‚: Œ .LDFCF –0Ö cr_lf:Ö LDFDE :\ Print filename in FCB1  1LD DE,NFtxt:Ö PrMessage :\ Print 'not found' ª6JP MainLoop :\ Return to command loop ´: ¾\ ---------------------- È\ Print filename in FCB1 Ò\ ---------------------- Ü .LDFDE æLD B,8:LD HL,&5D:Ö LDFF0 ðLD A,—".":Ö PrChar úLD B,3:LD HL,&65  .LDFF0 LD A,(HL):€ &7F CP &20:RET Z " Ö PrChar ,INC HL:DJNZ LDFF0 6RET @: J.z% T?.BATCH :ÝB &00 :\ Batch file active flag ^;.SUBFCB:ÝB &01:ÝM "$$$ SUB" :\ 'A $$$.SUB' filename h+\ F240 :ÝB &00 :\ EX r+\ F241 :ÝB &00 :\ S1 |+\ F242 :ÝB &00 :\ S2 †+\ F243 :ÝB &00 :\ RC �/ÝW 0:ÝW 0:ÝW 0:ÝW 0 :\ Alloc Vector šÝW 0:ÝW 0:ÝW 0:ÝW 0 ¤+\ F254 :ÝB &00 :\ CR ®,\ F255 :ÝW &0000:ÝB &00 :\ R0-R2 ¸OPT ¤opt(znos%) Â: Ì] ÖBIOS_WARM=&EA03 à&çznos%:BIOS_WARM=&F203:BATCH=&F233 ê: ô$LF204=BIOS_WARM+1:SUBFCB=BATCH+1 þ3LF242=SUBFCB+14:LF243=SUBFCB+15:LF254=SUBFCB+32 í :f$="SJCCP/SYS" =ñ"**SAVE ";f$;" ";~mcode%;" ";~O%;" ";~entry%;" ";~start% ÿ