þþÍ0 X;COM-DOS By Robert BerryX;Replacement Disk Utilities X;Package(X;2 X;Created using MAC/65 Macros<X; and another one, POKE.F>ŒD:SYSEQU.M65P …LBUFF€Z ƒPTRËd ƒAFPØn „FSUB`Úx ƒFPIÒÙ‚ ƒFR0ÔŒ ƒFR1à– †INBUFFó  ƒCIXòª ƒIFPªÙ´ „FASCæؾ …FMOVE¶ÝÈ †TRAMSZÒ†RESETVtä܆REBOOTwäæ †RAMTOPjð‡DOSLOADÈú …LOLENË …HILEN̆DRVBYT ‡WVERIFYy"†SABYTE , †POKMSK6 …IRQENÒ@†CONSOLÐJ†CDTMV2T†CDTMA2(^ …CHACTóh†NOCLIKÛr†COLOR1Å|†COLOR2Ɔ „FINEn †LOBYTEÍš †HIBYTEΤü® …CBUFF¸  †N1BUFFÌ Ö †N2BUFFà ê …DRNUMô þ …BUFF2 A‚1 A†INIDAT;Run address data à==á=& †RUNDAT0 =:ƒNNND ÿ=ÿN„PROGX ÿ=ÿ=€==¼=b ©==…=T=¢=l ©= ==B==©v ª==D==©=€ =E==©==Š H===I== ” V=ä=©==…=Tž ©= ==ü==`¨ R=U=N="=D=:² ‡FILEDAT¼ =====Æ ==.===Ð ›=à==á==€=ÚƒHEXä$ ========= =å ====== = = æ  ==î …CHECKø%>$>  ‡CMPLOOP QƒTAB8 R>ƒEOL;;End of command?*F†GOTCOM;;Yes!4R…LBUFF9;;No, compare next>H‡FINDEND;;branch FINDENDH2R3\ !‡CMPLOOPfX;p!X;Commands are not the same soq"X; far, so we must move to nextrX; command.zX;„ ‡FINDENDŽ3˜ QƒTAB8¢R>ƒEOL;;End of next command?¬H‡FINDEND;;No, do it again¶3;;Skip overÀ3Ê3Ô QƒTAB8ÞR>ÿ;;End reached?è F†ENDTABòX;ü%X;Not end of table, so reset X-regýX;and jump back to CMPLOOPX;$> !‡CMPLOOP$ †ENDTAB.(†PRINT =A—ýCommand not supported!A8 !ˆMAINLOOPB †GOTCOMLX;V%X;Goes here if a command is found.`X;j QƒTAB8tPƒPTR~ QƒTAB8ˆ PƒPTR’ !@ƒPTR:œX;¦#X;This is the command table. The°X;format is:ºX;.BYTE "COMMAND",EOLÄX;.WORD COMMANDÎX;Ø"X;A 255 should be placed at theâX;end of the table.ìX;öƒTAB A†FORMATA=ƒEOL  †FORMAT A„LOCKA=ƒEOL „LOCK( A†UNLOCKA=ƒEOL2 †UNLOCK< A†DELETEA=ƒEOLF †DELETEP A†RENAMEA=ƒEOLZ †RENAMEd AƒDIRA=ƒEOLn ƒDIRx A…BASICA=ƒEOL‚ …BASICŒ A†REBOOTA=ƒEOL– †REBOOT  A…BLOADA=ƒEOLª …BLOAD´ A„COPYA=ƒEOL¾ „COPYÈ AƒDUPA=ƒEOLÒ ‰DUPLICATEÜ A„WDOSA=ƒEOLæ „WDOSð A„WMEMA=ƒEOLú „WMEM A…BSAVEA=ƒEOL …BSAVE A„BOOTA=ƒEOL" „BOOT, A„HELPA=ƒEOL6 „HELP@ A‚GOA=ƒEOLJ ‚GOT A†STATUSA=ƒEOL^ †STATUSh A…CLICKA=ƒEOLr …CLICK| A?A=ƒEOL† †HEXDEC ÿ;;End of tableš ‡FMTFILE¤ AƒD1:A=ƒEOL® ‡DIRFILE¸ A†D1:*.*A=ƒEOL †DIRMSGÌ A”Directory - Drive #1AÍ ƒEOLÖ †DOSSYSà AŠD1:DOS.SYSA=ƒEOLê †MEMSAVô AŠD1:MEM.SAVA=ƒEOLþ ‡WVERMSG AŽWrite Verify: A ˆDRIVEMSG AActive Drives: A& ˆMAXFILES0 A•Maximum # of files thA1 A•at can be open simuA2 AŒltaneously: A: †FORMATD Q…LBUFFNR> 8X H…OKFMTb3†PRINT =A¢Can't format drive 8 from COM-DOS!Al !ˆMAINLOOPv …OKFMT€P‡FMTFILEŠ„XIO þ====‡FMTFILE”)>ž H†FMTERR¨ !ˆMAINLOOP² †FMTERR¼ !…ERRORÆ„LOCKЄXIO #====…LBUFFÚ)>ä H†LCKERRî !ˆMAINLOOPø †LCKERR !…ERROR  †UNLOCK„XIO $====…LBUFF )>* H†UNLERR4 !ˆMAINLOOP> †UNLERRH !…ERRORR †DELETE\„XIO !====…LBUFFf)>p H†DELERRz !ˆMAINLOOP„ †DELERRŽ !…ERROR˜ †RENAME¢„XIO  ====…LBUFF¬)>¶ H†RENERRÀ !ˆMAINLOOPÊ †RENERRÔ !…ERRORÞƒDIRè Q…LBUFFò R>ƒEOLü F†GETDIR P‡DIRFILE P†DIRMSG †GETDIR$ …OPEN ===‡DIRFILE. )>8 FˆSDIRLOOPB !…ERRORL ˆSDIRLOOPV †PRINT =†DIRMSG` ‡DIRLOOPj †INPUT =…LBUFFt )>ˆ~ F‡DIRDONEˆ )>’ F‡PRINTITœ !…ERROR¦ ‡PRINTIT° †PRINT =…LBUFFº !‡DIRLOOPÄ ‡DIRDONEÎ †CLOSE Ø !ˆMAINLOOPâ …ERRORì 'ƒFR0;;Store errorö X;Now close IOCB's 1 & 2 †CLOSE  †CLOSE  Q>;;Clear hi byte PƒFR0(  ƒIFP2 X;< !X;Error code now in FP format,F X;stored at FR0.P X;Z „FASCd X;n %X;Error code now in ATASCII formatx X;in LBUFF.‚ X;Œ X;Now find end of string, add– X;carriage return.  X;ª %>ÿ´ …ELOOP¾ 3È Q…LBUFF8Ò I…ELOOPÜ M>;;Un-invert char.æ P…LBUFF8ð Q>ƒEOLú P…LBUFF8;;Store EOL X; #X;Now in ATASCII format in LBUFF X;with EOL at end of it." X;, …BPUT =†ERRMSG= 6 †PRINT =…LBUFF@ !ˆMAINLOOPJ X;T X;^ X;h †ERRMSGr  AŒI/O Error - A| X;† X; X;š ˆMAINLOOP¤ Q>Ê® P†COLOR1¸ Q>ð P†COLOR2Ì …BPUT =„EMSG=Ö …POKE ü=ÿà †INPUT =…LBUFFê !…CHECKô „EMSGþ  ƒEOL=AŽEnter command:Aÿ  ƒEOL X; X; X;& …BEGIN0 Q>ÿ: P„FINE? %X; Do I/O to enable fine scrollingD …OPEN ===A‚E:AN 6†PRINT =A¥}COM-DOS Ver. 3.1 02/06/86AX Q†POKMSKb M>l P†POKMSKv P…IRQEN€ Q>4†VBROUTŠ P†CDTMA2” Q>5†VBROUTž P†CDTMA2¨ Q> ² P†CDTMV2¼ !ˆMAINLOOPÆ †VBROUTÐ Q…CHACTÚ N>ä P…CHACTî Q> ø P†CDTMV2 : X; X; X;* …BASIC4 Q†TRAMSZ> F…NOBASH !†RESETVR …NOBAS\ †PRINT =AŽýNo Cartridge!Af !ˆMAINLOOPp …BLOADz …OPEN ===…LBUFF„ ‡DOSLOADŽ !ˆMAINLOOP˜ X;¢ X;¬ „COPY¶ "X;Format: COPY D1:file,D2:FILE2À %>Ê …CLOOPÔ Q…LBUFF8Þ R> ,è FˆFNDCOMMAò 3ü !…CLOOP ˆFNDCOMMA Q>ƒEOL P…LBUFF8$3.$>8 †CLOOP2B Q…LBUFF8L P…CBUFF9V R>ƒEOL` FˆMOVEDONEj3t2~ !†CLOOP2ˆ ˆMOVEDONE’…OPEN ===…LBUFFœ)>¦ F†FRSTOK° !…ERRORº †FRSTOKÄ%>ÿÎ †SLLOOPØ3â Q…CBUFF8ìR> /;;Append?ö FˆAPPENDIT R>ƒEOL  H†SLLOOP…OPEN ===…CBUFF)>( F†SCNDOK2 !…ERROR< ˆAPPENDITF Q>ƒEOLP P…CBUFF8Z…OPEN = ==…CBUFFd)>n F†SCNDOKx !…ERROR‚ †SCNDOKŒ…BGET =‰ENDCOMDOS=€–)>ˆ  F…ITSOKª)>´ F†PUT128¾ !…ERRORÈ †PUT128Ò…BPUT =‰ENDCOMDOS=€Ü !†SCNDOKæ …ITSOKð Q†ICBLEN9ú P…LOLENQ†ICBLEN9 P…HILEN$> " ˆPUTBYTES, !ˆCONTCOPY6 ˆPUTBYTES@ Q>†CPBINRJ P…ICCOM9TQ>4‰ENDCOMDOS^ P†ICBADR9hQ>5‰ENDCOMDOSrP†ICBADR9| Q…LOLEN† P†ICBLEN9 Q…HILENšP†ICBLEN9¤ ƒCIO®:¸ ˆCONTCOPYÂ)>Ì F†ITSOK2Ö !…ERRORà †ITSOK2ê †CLOSE ô †CLOSE þ†PRINT =AŒFile copied.A !ˆMAINLOOPX;#X;DUPLICATE - Will duplicate the&"X;file specified after command.0X;: ‰DUPLICATED2†PRINT =A¡Insert source disk, press RETURN.AN…POKE ü=ÿX †DGLOOPbQülR> v H†DGLOOP€…OPEN ===…LBUFFŠ)>” F…DUPOKž !…ERROR¨ …DUPOK²…BGET =‰ENDCOMDOS=`ê¼)>ˆÆ F†DUPOK2Ð !…ERRORÚ †DUPOK2ä Q†ICBLEN9î P…LOLENøQ†ICBLEN9 P…HILEN  †CLOSE 6†PRINT =A¥Insert destination disk, press RETURNA …POKE ü=ÿ* ‡GETLOOP4Qü>R> H H‡GETLOOPR…OPEN ===…LBUFF\$>f ˆPUTBYTESp)>z F†DUPOK3„ !…ERRORŽ †DUPOK3˜ †CLOSE ¢&†PRINT =A•Duplication complete.A¬ !ˆMAINLOOP¶„WDOSÀ Q…LBUFFÊP†DOSSYSÔ…OPEN ===†DOSSYSÞ)>è H‡WDOSERRò †CLOSE ü&†PRINT =A•DOS.SYS file written.A !ˆMAINLOOP ‡WDOSERR !…ERROR$„WMEM. Q…LBUFF8R> 8B H‡WMEMSAVL0†PRINT =AŸCan't write MEM.SAV to drive 8!AV !ˆMAINLOOP` ‡WMEMSAVjP†MEMSAVt…OPEN ===†MEMSAV~)>ˆ H‡WMEMERR’…BPUT =‰ENDCOMDOS=ùœ)>¦ H‡WMEMERR° †CLOSE º&†PRINT =A•MEM.SAV file written.AÄ !ˆMAINLOOPÎ ‡WMEMERRØ !…ERRORâ …BSAVEì%>ö$> ‡BSVLOOP  Q…LBUFF8R> , F†BENDFL( P…CBUFF923<2F !‡BSVLOOPP †BENDFLZ Q>ƒEOLd P…CBUFF9n$>;;Copy 1st #x3‚ ‡CN1LOOPŒ Q…LBUFF8–R> ,  F‡CN1DONEª P†N1BUFF9´3¾2È !‡CN1LOOPÒ ‡CN1DONEÜ Q>ƒEOLæ P†N1BUFF9ð$>ú3 ‡CN2LOOP Q…LBUFF8 P†N2BUFF9" R>ƒEOL, F‡CN2DONE63@2J !‡CN2LOOPO"X; Filename now in LBUFF, n1 inPX; N1BUFF, n2 in N2BUFF.T ‡CN2DONE^X;Open IOCB 1 for outputh…OPEN ===…CBUFFrX;|…BPUT =ƒNNN=†$X;Now convert second number to FPX;š Q>4†N2BUFF¤ P†INBUFF® Q>5†N2BUFF¸P†INBUFFÂQ>ÌPƒCIXÖ ƒAFPà ƒFPIêQƒFR0ôPƒPTRþ QƒFR0 PƒPTR ƒIFPX;&X;Move it to FR10X;: …FMOVEDX;NX;Convert 1st number to FPXX;b Q>4†N1BUFFl P†INBUFFv Q>5†N1BUFF€P†INBUFFŠQ>”PƒCIXž ƒAFP¨X;²X;Convert # to Integer¼X;Æ ƒFPIÐ…BPUT =ƒFR0=Ú…BPUT =ƒPTR=äX;î$>øQƒFR0 P†ICBADR9  QƒFR0P†ICBADR9 X;*X;Convert 1st # back to FP4X;> ƒIFPH …FMOVE;;Put it in FR1RX;\$X;Convert 2nd # back to FP in FR0fX;p Q>4†N2BUFFz P†INBUFF„ Q>5†N2BUFFŽP†INBUFF˜Q>¢PƒCIX¬ ƒAFP¶X;ÀX;Do subtractionÊX;Ô „FSUBÞ ƒFPI;;Convert to intèX;ò$>ü#ƒFR0QƒFR0 F…INCHI H†STORIT$ …INCHI. #ƒFR08 †STORITB P†ICBLEN9L QƒFR0VP†ICBLEN9` Q>†CPBINRj P…ICCOM9t ƒCIO;;Put bytes~<†PRINT =A«Enter RUN address (press RETURN if none)Aˆ†INPUT =…LBUFF’ Q…LBUFFœ R>ƒEOL¦ F†GOMNLP° Q>4…LBUFFº P†INBUFFÄ Q>5…LBUFFÎP†INBUFFØQ>âPƒCIXì ƒAFPö ƒFPIQƒFR0  P†RUNDAT QƒFR0P†RUNDAT(…BPUT =†INIDAT=2 †GOMNLP< †CLOSE F†PRINT =A‹File saved.AP !ˆMAINLOOPZ„BOOTd#…OPEN ===AD:AUTORUN.SYSAn)>ªx F†DOBOOT‚ †CLOSE Œ2†PRINT =A¡ýAUTORUN.SYS file already exists!A– !ˆMAINLOOP  †DOBOOTª †CLOSE ´#…OPEN ===AD:AUTORUN.SYSA¾%>È ˆBOOTLOOPÒQ…LBUFF8Ü P‡FILEDAT8æ R>ƒEOLð FˆDONEBOOTú3 !ˆBOOTLOOP ˆDONEBOOT…BPUT =„PROG=I" †CLOSE , !ˆMAINLOOP6„HELP@&…BPUT =‡HELPLST=†ENDLST‡HELPLSTJ !ˆMAINLOOPT ‡HELPLST^ A}Ah A” LOCK D:filename.extAi AŠ DIRnA=ƒEOLr A• UNLOCK D:filename.exAs AŒt FORMATnA=ƒEOL| A• DELETE D:filename.exA} AŠt WDOSnA=ƒEOL† A‘ RENAME D:old,newA‡ AŽ WMEMnA=ƒEOL A• BSAVE D:file,begin,eA‘ A‹nd REBOOTA=ƒEOLš A• BLOAD D:filename.extA› AŒ GO addrA=ƒEOL¤ A• COPY D:file1,D2:fileA¥ AŠ2[/] BASICA=ƒEOL® A“ DUP D:filename.extA¯ A STATUSA=ƒEOL¸ A’ BOOT filename.extA¹ A CLICKA=ƒEOL A• ?hxnm Aà A‰ HELPA=ƒEOLÌ ƒEOL=A‘n=drive number (1AÍ ƒEOL=Aƒ-8)A=ƒEOLÖ A•hxnm = 4-digit hex nuA× A„mberA=ƒEOLà A•All input MUST be in Aá Aˆdecimal.A=ƒEOLê †ENDLSTô‚GOþQ>4…LBUFF P†INBUFFQ>5…LBUFFP†INBUFF&Q>0PƒCIX: ƒAFPD ƒFPIN !@ƒFR0:X †STATUSb…BPUT =‡WVERMSG=l Q‡WVERIFYvR>P€ F†VEROFFŠ†PRINT =A‚ONA” !‡DRIVES?ž †VEROFF¨†PRINT =AƒOFFA² ‡DRIVES?¼…BPUT =ˆDRIVEMSG=Æ Q†DRVBYTÐM>Ú F†NXTBITäQ> 1î …PRBITø †NXTBIT Q†DRVBYT M> F‡NXTBIT2 Q> 2* …PRBIT4 ‡NXTBIT2> Q†DRVBYTHM>R F‡NXTBIT3\Q> 3f …PRBITp ‡NXTBIT3z Q†DRVBYT„M>Ž F‡NXTBIT4˜Q> 4¢ …PRBIT¬ ‡NXTBIT4¶ Q†DRVBYTÀM>€Ê FˆENDDRIVEÔQ> 8Þ …PRBITè ˆENDDRIVEò †PRINT ü…BPUT =ˆMAXFILES=6 Q†SABYTEPƒFR0Q>$ PƒFR0. ƒIFP8 „FASCB%>ÿL ‡MAXLOOPV3` Q…LBUFF8j I‡MAXLOOPtM>~ P…LBUFF8ˆ Q>ƒEOL’P…LBUFF8œ†PRINT =…LBUFF¦ !‡CHANGEM° …PRBITº P…BUFF2Ä…BPUT =…BUFF2=Î:Ø ‡CHANGEMâ †PRINT ì2†PRINT =A¡Toggle Write Verify on/off (Y/N)?Aö†INPUT =…CBUFF Q…CBUFF R> Y F„CHWV R>ƒEOL( H‡CHCONT12 !ˆMAINLOOP< ‡CHCONT1F !‡CHDRVS?P„CHWVZ Q‡WVERIFYdN>n P‡WVERIFYx ‡CHDRVS?‚,†PRINT =A›Change active drives (Y/N)?AŒ†INPUT =…CBUFF– Q…CBUFF R> Yª F†CHNGDR´ R>ƒEOL¾ H‡CHCONT2È !ˆMAINLOOPÒ ‡CHCONT2Ü !†CHFLS?æ †CHNGDRðV†PRINT =AÅType the drive numbers, one at a time,pressing RETURN after each one.Aú.†PRINT =AEnter 0 when you're finished.AQ> P…DRNUM †DRLOOP"†INPUT =…CBUFF, Q…CBUFF6R> 0@ F†DONEDRJR> 1TFƒDR1^R> 2hFƒDR2rR> 3|FƒDR3†R> 4FƒDR4šR> 8¤FƒDR8® !†DONEDR¸ƒDR1ÂQ>Ì,Ö O…DRNUMà P…DRNUMê !†DRLOOPôƒDR2þQ> , O…DRNUM P…DRNUM& !†DRLOOP0 ƒDR3: Q>D ,N O…DRNUMX P…DRNUMb !†DRLOOPl ƒDR4v Q>€ ,Š O…DRNUM” P…DRNUMž !†DRLOOP¨ ƒDR8² Q>€¼ ,Æ O…DRNUMÐ P…DRNUMÚ !†DRLOOPä †DONEDRî Q…DRNUMø P†DRVBYT! †CHFLS? !K†PRINT =AºChange number of files that can be open simultaneously?A!†INPUT =…CBUFF ! Q…CBUFF*!R> Y4! F…CHFLS>! !ˆMAINLOOPH! …CHFLSR!F†PRINT =AµHow many files do you want open at one time (1-7)?A\!†INPUT =…CBUFFf! Q>4…CBUFFp! P†INBUFFz! Q>5…CBUFF„!P†INBUFFŽ!Q>˜!PƒCIX¢! ƒAFP¬! ƒFPI¶!QƒFR0À! P†SABYTEÊ! !ˆMAINLOOPÔ! …CLICKÞ! Q†NOCLIKè!N>ÿò! P†NOCLIKü! !ˆMAINLOOP" †HEXDEC" Q…LBUFF" „COMP$" P†HIBYTE." Q…LBUFF8" „COMPB" P†LOBYTEL" „MULTV" PƒFR0`" Q…LBUFFj" „COMPt" P†HIBYTE~" Q…LBUFFˆ" „COMP’" P†LOBYTEœ" „MULT¦"PƒFR0°" ƒIFPº" „FASCÄ"%>ÿÎ" †HDLOOPØ"3â" Q…LBUFF8ì" I†HDLOOPö"M># P…LBUFF8 # Q>ƒEOL#P…LBUFF8#†PRINT =…LBUFF(# !ˆMAINLOOP2#„COMP<#;F#S>0P#>Z# QƒHEX9d#:n#„MULTx# Q†HIBYTE‚#T?Œ#T?–#T? #T?ª#,´# O†LOBYTE¾#:È# ‰ENDCOMDOSÒ#à;;Run addressÜ# …BEGIN